Pull Requests are welcome ;)
This project is a starter for express, typescript and mongoose application, designed for Restful API's, but you can easily extend to make other things.
I couldn't find any complete guide to archieve this, so i've looked many tutorials and posts about express with typescript and came up with seed application.
- Latest version of Node to be installed(i recommend NVM, easier to install and possible to work with multiple node versions).
- Install MongoDB and make sure it is running on default port 27017 (if not then please configure constants.ts and change the connection for mongoDB).
npm install <= install all the npm Dependencies
npm run dev <= start the Nodemon and watch for changes.
express-typescript-mongoose-starter
βββ dist <= typescript will compile js to this folder
βββ node_modules
βββ src
β βββ .env <= for production, for other envs, use: .env.${NODE_ENV}
β βββ api
β β βββ example <= Replace example for feature name
β β β βββ example.controller.ts
β β β βββ example.model.ts
β β β βββ example.router.ts
β βββ config
β β βββ express.ts
β β βββ routes.ts
β βββ server.ts
β βββ tsconfig.json
βββ package.json
βββ tsconfig.json
βββ README.md
- Add JWT based authentication with passport.js
- Add socket.io and inject socket instace to routes and controller
- Command line support to generate libraries, modules, routes and controllers
MIT