Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 1.42 KB

README.md

File metadata and controls

54 lines (32 loc) · 1.42 KB

Trivia Game

Simple Trivia Game to show my current Frontend and Backend Code Skills

Requisite

npm

node

mongodb for backend part

Start

To start just the Frontend (which works with react/webpack dev server)

  1. cd client/
  2. npm i
  3. npm start
  4. check your browser at: http://localhost:3000

If you want to see how it works with backend API, you will need to add your database string in server/server.js line 8 - where DB_STRING variable is. Once this is done, backend can be run in this way.

  1. cd server/
  2. npm i
  3. npm start

Screen Shot 2020-08-25 at 17 25 27 Screen Shot 2020-08-25 at 17 25 33 localhost_3000_ Screen Shot 2020-08-25 at 17 25 18

Routes

The application has 3 public routes:

/ - Welcome page

/questions - Trivia Game Questions

/results - Result page

The API routes are:

GET /api/scores - return a list of all saved usernames and scores

PUT /api/score - save or update a score for a certain user in the db.

Notes

This application use create-react-app