Skip to content

An Express.js TypeScript template preconfigured with TypeScript and nodemon for a seamless development experience.

Notifications You must be signed in to change notification settings

Jonvry/expressjs-ts-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Express.js TypeScript Template

This is a minimal Express.js + TypeScript template designed for speed and ease of use. It requires no extra configurationβ€”just install dependencies and start coding!

πŸš€ Features

  • Pre-configured TypeScript setup
  • Minimal dependencies for fast setup
  • Nodemon support for automatic reloads during development
  • Git-ready with a .gitignore to avoid unnecessary files
  • No need for an extra package to load environment variablesβ€”just create a .env file in the root.

πŸ“¦ Installation

  1. Clone the repository

    git clone https://github.com/Jonvry/expressjs-ts-template.git
    cd expressjs-ts-template
  2. Install dependencies

    npm install
  3. Create a .env file in your root directory and define your environment variables:

    PORT=4000
  4. Run the development server

    npm run dev
  5. Build and start for production

    npm run build
    npm start

πŸ“‚ Project Structure

express-js-typescript-template/
│── src/
β”‚   β”œβ”€β”€ index.ts   # Main entry point
│── dist/          # Compiled output (required in development and production)
│── .gitignore     # Ignores unnecessary files
│── package.json   # Project dependencies and scripts
│── tsconfig.json  # TypeScript configuration

πŸ“œ Scripts

Script Description
npm run dev Starts the app in development mode with Nodemon
npm run build Compiles TypeScript to JavaScript
npm start Runs the compiled app

πŸ“œ Dependencies

  • express - Web framework for Node.js
  • typescript - Type definitions for better coding experience
  • nodemon (dev) - Auto-restarts the server on changes
  • ts-node (dev) - Run TypeScript directly without compiling

πŸ’‘ Why Use This Template?

  • No need for extra configuration.
  • Faster development with automatic reloading.
  • Pre-configured TypeScript for type safety.

🌟 Contributing

Feel free to submit issues and pull requests to improve this template!

About

An Express.js TypeScript template preconfigured with TypeScript and nodemon for a seamless development experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published