These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- NodeJS
- Node Package Manager(NPM)
- Git
- PostgreSQL
A step by step series of examples that tell you have to get a development environment running
- Download ZIP file or clone the repository to create your own copy.
git clone https://github.com/coding-blocks/boss.git
- Move to the boss repository
cd ./boss
- Install all project dependency packages via NPM
npm install
-
Create a
secrets.json
file in the root directory taking hint from thesecrets-sample.json
file or You can also create a copy ofsecrets-sample.json
file and rename it assecrets.json
in the root directory. ( Don't worry secrets.json is already added to .gitignore file so it won't be commited ) -
Create a Client on Coding Blocks OneAuth using https://account.codingblocks.com/clients/add
Remember the Client ID and Client Secret and copy them to your secrets.json
file.
Also, remember to change the callback URL to your desired url. You can use http://localhost:3232/login/callback
if you are testing on your localhost system.
- Set up PostgreSQL
- If you don't have PostgreSQL setup on you machine you can download it from here.
- If you have renamed the
secrets-sample.json
file tosecrets.json
then- After Installation is complete create a new PostgreSQL user username with password as pass.
- Create a new database in PostgreSQL server with name dbname.
- If you have created a new
secrets.json
file then create the respective things accordingly.
- Start the server.
npm start
And see it working on http://localhost:3232
BOSS_DEV=localhost node index.js
GET /api/claims?[status=accepted]
POST /api/claims/add
BODY
{
user: "championswimmer",
issueUrl: "http://github.com/coding-blocks/lab/issues/7",
pullUrl: "http://github.com/coding-blocks/lab/pull/7",
bounty: 20
}