Coding project for MedCircle
- Clone the repo.
- Put the given
.env
file in the root of the project. - Navigate to the root folder and run
npm i
thennpm test
. If tests pass, skip to 6. If not, in the.env
file editDATABASE_URL
to belocalhost
, then continue to 3. - If you do not have PostgreSQL installed, run
sh scripts/install.sh
. This will install it using Homebrew. - Navigate to the repo and run
npm run setup
. This will create a database called "medcircle-project". In that database a table called "articles" will be created. - Run
npm start
to start the server. - Navigate to localhost:3000/api/v1 for API instructions (you will need an
Authorization
header with the valuebearer {TOKEN}
).
- To disable the authentication comment out line 13 in
server/server.js
. npm test
runs eslint and unit tests.npm run drop-table
drops the article table.