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.
- 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.
-
Clone the repository:
git clone https://github.com/your-username/basic-express-typescript-template.git
-
Install dependencies:
cd basic-express-typescript-template npm install
-
Create a
.env
file in the root directory and define your environment variables:NODE_ENV=development PORT=3000
-
Build the project:
npm run build
-
Start the development or production server:
# development npm run dev # production npm start
The development server will restart automatically whenever you make changes.
- 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.
- @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.
This project is licensed under the MIT License.
Express, TypeScript, Template, Starter, Minimal, Basic, Cross-Env, File Watch, File Monitoring