Backend for a sample email subscription project.
First install the dependencies
npm install
Then create .env file using the following template
HTTP_PORT=3000
MONGO_URL=mongodb://127.0.0.1:27017/subscribers
EMAIL_TRANSPORT_HOST=
EMAIL_TRANSPORT_PORT=
EMAIL_TRANSPORT_SECURE=
EMAIL_TRANSPORT_USER=
EMAIL_TRANSPORT_PASSWORD=
EMAIL_FROM=[email protected]
Start the server
npm start
Testing
npm test
- koa (HTTP framework)
- Mongoose (ORM)
- inversify (dependency injection)
- ajv (data validation)
- swagger (API documentation)
- jest (Testing Framework)
Check swagger documentation http://localhost:3000/swagger