Link to hosted backend Backend for CEYEBER critical thinking game. Front-end
- Product Owner: Aqsa
- Scrum Facilitator: Jessica
- Quality: Jennifer
- UX/UI: My Hoa
- DevOps: Rihards
- NodeJS
- Express
- PostgreSQL
- Heroku (deployment of database)
- Clone this repo to your machine
- Run
npm install - Set up local database
- run
psqlin your terminal CREATE USER myuser SUPERUSER PASSWORD mypasswordCREATE DATABASE ceyeber WITH OWNER myuser\c ceyeberor if you are in the terminalpsql -d ceyeber -U myuserand insert password when prompted\i src/database/init.sql
- run
- Create a .env file in the root folder with
DATABASE_URL=postgres://myuser:mypassword@localhost:5432/ceyeber - Run
npm run devto start the server
Base URL is either your local host or https://ceyeber.herokuapp.com/
POST /user- requires a JSON object like example below. Once a user has signed up, the server will send back and store the user id into the session storage
{
"agent": "BrownFox",
"age": "8",
"location": "United Kingdom"
}POST /skills- requires a JSON object like example below - user id will automatically be taken from users session storage
{
"user_id": "2",
"facebook" : "2",
"instagram" : "2",
"snapchat" : "2",
"tiktok" : "2",
"twitter" : "2",
"whatsapp": "2",
"youtube" : "2"
}POST /answers- requires a JSON object like example below - user id will automatically be taken from users session storage
{
"user_id": "2",
"q1a1": "1",
"q1a2": "1",
"q2a1": "1",
"q2a2": "1",
"q3a1": "1",
"q3a2": "1"
}
