How to get started
What you will need before you can use this
- A google cloud provider account:
- Google storage bucket.
- Sendgrid account and the sendgrid_api_key
Setting up this repo
- Clone the repository:
git clone https://github.com/hackmcgill/hackerAPI.git - Make sure you have the following tools:
git: https://git-scm.com/downloadsmongodb: https://docs.mongodb.com/manual/installation/- Make sure you also have the
/data/dbdirectory. - To test the installation, run
mongod.
- Make sure you also have the
node: https://nodejs.org/en/download/npm: https://www.npmjs.com/get-npm.Postman: https://www.getpostman.com/downloads/. We use this for testing the API locally.
- Make sure you have the following (only if you are going to be publishing this as a kubernetes cluster on google cloud):
- Create a
.envfile in the root directory, and populate the fields as per.env.example. - run
npm install
Setting up the database
- Determine which environment the database you want to seed belongs to (
deployment,development, ortest). - Navigate to
package.json, and confirm that at theseedscript,NODE_ENVis set to the proper environment. - Run
npm run seed.
Testing the API
In order to test that you have set up the API properly, run npm run test.