Skip to content

A minimal starter template for express and typescript. Comes with automatic recompile and restart in development mode when a file changes.

License

Notifications You must be signed in to change notification settings

cudidotdev/basic-express-typescript-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Express TypeScript Template

This is a minimalistic starter template for building Express.js applications using TypeScript. It provides a basic project structure and configuration to help you quickly kickstart your development.

Features

  • Express.js: A fast, unopinionated, minimalist web framework for Node.js.
  • TypeScript: A superset of JavaScript that adds static typing and other features to the language.
  • Cross-Environment Configuration: Uses cross-env to set environment variables across different platforms.
  • Dotenv: Loads environment variables from a .env file into process.env.
  • File Watching: Utilizes nodemon and TypeScript's watch mode for efficient development.

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/basic-express-typescript-template.git
  2. Install dependencies:

    cd basic-express-typescript-template
    npm install
  3. Create a .env file in the root directory and define your environment variables:

    NODE_ENV=development
    PORT=3000
  4. Build the project:

    npm run build
  5. Start the development or production server:

    # development
    npm run dev
    
    # production
    npm start

    The development server will restart automatically whenever you make changes.

Dependencies

  • Express: Web framework for Node.js.
  • TypeScript: Typed superset of JavaScript.
  • Dotenv: Loads environment variables from a .env file.
  • Cross-Env: Sets environment variables across platforms.

Dev Dependencies

  • @types/express: TypeScript definitions for Express.
  • @types/node: TypeScript definitions for Node.js.
  • Concurrently: Runs multiple commands concurrently.
  • Nodemon: Monitors for changes and automatically restarts the server.
  • Rimraf: Cross-platform file deletion utility.
  • TypeScript: Compiler for TypeScript.

Author

License

This project is licensed under the MIT License.

Keywords

Express, TypeScript, Template, Starter, Minimal, Basic, Cross-Env, File Watch, File Monitoring

About

A minimal starter template for express and typescript. Comes with automatic recompile and restart in development mode when a file changes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published