Skip to content

Blog for UNICAMP-FT lecture of 'Science, Technology and Society'

License

Notifications You must be signed in to change notification settings

LVSant/rocket-blog-api

Repository files navigation

Blog Rocket - API Build Status

Backend API designed for an exercise of lecture 'Science, Technology and Society' of UNICAMP-FT State University of Campinas

Getting Started

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.

Prerequisites

In order to build the project, it's necessary to have installed in your system the following packages:

Installing

Clone the repository

git clone https://github.com/leonardoviveiros/rocket-blog-api.git

Enter the directory

cd rocket-blog-api/

Install the dependencies

npm install

Set up environment variables

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

Running the tests

npm run test

Running locally

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

Deployment

This project is configured to deploy automatically on Heroku after the CI tests passed See Travis CI Heroku deploy documentation for details

Dependencies

Vide package.json

Contributing

Contributions are welcome. Fork and make a pull request with information about the change.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

</> with 💚 by Leonardo Viveiros

About

Blog for UNICAMP-FT lecture of 'Science, Technology and Society'

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published