A simple Node.js API that allows consumers (citizens) vote for politicians running for different government offices. Up to date version of project can be found on the develop
branch.
- NodeJS/Express
- Postgres/Sequelize ORM
- Mocha & Chai
- Clone the repository:
git clone https://github.com/mazma1/politico
- Ensure you have installed NodeJS and Postgres
- Navigate into the app's root directory:
cd politico
- Create a
.env
file in the root directory using the sample.env.sample
file and update the credentials as specified. - Install all dependencies:
npm install
- Run tests to ensure the app is not broken:
npm test
- Run
npm run db:migrate
to populate your database with initial user data - Start the app:
npm run start:dev
Access to endpoints are restricted based on the authorization token assigned to the user. This token is generated when a new user signs up, and when a returning user signs in.
For more of the api, go here.