Backend API designed for an exercise of lecture 'Science, Technology and Society' of UNICAMP-FT State University of Campinas
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
In order to build the project, it's necessary to have installed in your system the following packages:
git clone https://github.com/leonardoviveiros/rocket-blog-api.git
cd rocket-blog-api/
npm install
There are four necessary variables used, and for safety purpouses, their values are only on the server In order to run the project locally, we need to set the values of these variables.
The variables are:
- jwtSecret - Contains the secret password used in JsonWebToken
- database - MongoLab URL to the Production database
- databaseTest - MongoLab URL to the Test database
- userAdminPassword - The password used to create the SuperAdmin user, in the case there isn't one
All this variables can be found in the file ./config.js
npm run test
In order to run the project on http://localhost:8080 with the test database, run:
npm run dev
To connect using the production database and production environment, run:
npm run start
This project is configured to deploy automatically on Heroku after the CI tests passed See Travis CI Heroku deploy documentation for details
Vide package.json
Contributions are welcome. Fork and make a pull request with information about the change.
This project is licensed under the MIT License - see the LICENSE.md file for details
</> with 💚 by Leonardo Viveiros