Node.js webservice awesome boilerplate with typescript, mongodb and tests
I always like to start development as soon as I can, but there always need to spend time by configuring an app.
Building Node.js web service can be very easy if requirements are simple. By considering that in mind, I created this boilerplate to provide nice structure of project.
- Node.js restful api service building easily
- Using mongodb, you can configure either local or remote one
- Configured with tests, so you can use TDD aproach
- Using typescript for better type safe code and great intellisense power. (pre-configured lint and rules)
- Cool logging feature included!
- Configured with Basic security
- Ready with example endpoint (event) and its tests!
- It's very basic boilerplate
- It's not configured with any authentication mechanism
- Neither it has any session related configuration
You can start using this for your start up of app. And modify it according to your need. Add missing features like session, authentication etc.
Though I will continue to make it advanced and will add those features in separate branch in future.
Usage is very easy!
Clone it and start development!
You can either install mongodb in your local machine or use remote mongodb server like gcloud etc.
Start in development mode:
npm run dev
Run tests:
npm test
Run in production:
npm run prod
Lint:
npm run lint
To test:
default url is http://localhost:3000
-
Get All events
http://localhost:3000/event