This is a simple Node JS template for simple and small backend projects.
- src/
api/
routesassets/
static content, such email templatesconfig/
configuration handlersinfrastructure/
auxiliary services used for external communication, logging, etc.models/
where de models are definedservices/
services with operational logicsubscribers/
where the pub/sub objects are definedapp.js
server configurationserver.js
server runner
- test/
helpers/
helper classes for testing...
test folder structure
This template provides:
- An endpoint for sending contact messages: It sends a contact e-mail to the receiver and a confirmation e-mail to the sender.
- A very simple and console-based logging system based on pub/sub pattern.
- A basic route system with a validation example.
Only clone it and adapt the template to your requirements!
Please, follow the next steps for start working:
- Clone this repository
- Install dependencies
- Copy .env.example into .env
- npm start