node express boilerplate using ts
npm install create-node-express-ts-boilerplate
- src
- server.ts #Express App
- controllers #Controllers for the routes
- middlewares #Authentication Middlewares
- models #Schema Models
- routes #App routes
- services #Services for the routes
- utils #Utils
- .env.example #Environmental variables
- migrate-mongo-config.js #Config file of migrate mongo
- package.json
- README.MD
- tsconfig.json
`Quick Start
To create a project, simply run:`bash
npx create-node-express-ts-boilerplate
`
Or`bash
npm init node-express-ts-boilerplate
`Manual Installation
Clone the repo:
`bash
git clone --depth 1 https://github.com/vigneshdemitro/node-express-ts-boilerplate.git
cd node-express-ts-boilerplate.git
`Install the dependencies
`bash
$ npm install
`Setting up Environmental variables
- copy .env.example and create .env
- .env can be configured according to the usage
Generating dataset
`bash
$ npm run migrateThis creates the users with dummy data with help of faker-js
`Running the app
`bash
production
$ npm run startStarts the server in the production mode.\
http://localhost:4001/api/v1 to do postman tests.
``bash
development
$ npm run devStarts the server in the development mode.\
http://localhost:4001/api/v1 to do postman tests.
``