A public API for the web app, and mobile apps to consume.
If you are reading this, thanks for stopping by. You may be familiar with the Redadalertas project.
This project is part of that. This repo will house the code to make the public facing API.
https://cosecha.github.io/redadalertas-api/
Make sure you have the following installed on your computer
- Node.js (latest)
- Yarn
- Git
- Mongo
- Xcode Command Line Tools:
xcode-select --install
(required to properly install the bcrypt package)
-
Clone the repository
-
Setup the environment variables in the / directory:
cp src/.env.example src/.env
-
Install node modules in the /src directory, we recommend using Yarn:
yarn
in the /src directory -
Run MongoDB service:
brew services start mongodb
-
Update the MongoDB database:
yarn run bootstrap
in the /src directory -
Start server:
yarn start
in the /src directory -
To shut down server:
Ctrl + c
in server terminal -
To shut down database:
brew services stop mongodb
yarn start
: starts the server (alsonpm start
)yarn test
: performs testing (alsonpm test
)yarn run lint
: runs the linter (alsonpm run lint
)yarn run bootstrap
: populates your local mongo db with sample data (alsonpm run bootstrap
)