Tested on Node v6 and above
- ES6 for the latest & greatest javascript awesomeness
- MongoDB w/ Mongoose for data layer
- Testing via Mocha & Chai
- Test coverage via Isparta
- Username/Email registration and authentication
# Clonar el proyecto
git clone https://github.com/thecactusgroup/node-rest-api-boilerplate.git
cd node-rest-api-boilerplate
# Instalar las dependencias
npm install
# Asegurate de tener instalado MongoDB, para correr la base localmente.
[MongoDB](https://www.mongodb.com/)
Una vez instalado, abrir una nueva terminal y ejecutar mongod
# Correr la API
npm start
# Try it!
curl -H "Content-Type: application/json" -X POST -d '{"username":"jamesdean", "email": "example@gmail.com", "password":"password1"}' http://localhost:4567/usersPlace a .env file in the top level of the directory you've cloned. These variables will be automatically assigned to process.env when the application boots. It is gitignored by default as it's not good practice to store your environment variables in your remote repository.
Your .env file can look something like this:
MONGO_URI=mongodb://somewhere:27017
SESSION_SECRET=lolthisissecretNow we can access one of these variables with something like process.env.MONGO_URI!
npm start- Start live-reloading development servernpm test- Run test suitenpm run test:watch- Run test suite with auto-reloadingnpm run coverage- Generate test coveragenpm run build- Generate production ready application in./build