This repository contains a starter template for Express.js applications with TypeScript and Mongoose integration.
A starter template for building Express applications with TypeScript and Mongoose. This template will help you get started quickly with new projects and ensure a consistent setup across your work.
Clone the Repository
git clone https://github.com/Tanzeebul-Tamim/Express-Mongoose-TS-Starter_Pack
Install Dependencies
npm install
Set Up Environment Variables
Create a .env
file in the root directory and copy the contents of .env.example
into it. Update the values as needed.
cp .env.example .env
Start the development server:
npm run dev
Compile the TypeScript code:
npm run build
Start the production server:
npm run prod
Run ESLint to check for code issues:
npm run lint
Automatically fix linting issues:
npm run lint:fix
Format your code using Prettier:
npm run format
./project_root
├── src
│ ├── app
│ │ └── config
│ │ └── index.ts # Load environment variables using dotenv from the .env file and export them as configuration options
│ ├── app.ts # Express app setup
│ └── server.ts # Entry point
├── .env.example # Example environment variables
├── .eslintignore # Specifies files and directories to ignore during ESLint linting
├── .eslintrc.json # ESLint configuration
├── .gitignore # Specifies files and directories to ignore in Git version control
├── .prettierrc.json # Prettier configuration
├── package-lock.json # Records the exact dependency tree generated by npm for a project
├── package.json # NPM scripts, dependencies and dev-dependencies
└── tsconfig.json # TypeScript configuration
git checkout -b feature-branch
).git commit -m 'Add some feature'
).git push origin feature-branch
).