- Node >= 16.x (prefer current LTS version)
- NPM >= 8.x (upgrade executing
npm i -g npm
) - Chrome >= 103.x
โ Other browser/Node/NPM configurations might work but haven't been tested.
- Postman HTTP client or similar.
- React Devtools & Redux Devtools Chrome extensions.
- Clone repo without forking. If you cloned before today, execute
git fetch && git reset --hard origin/main
to get the latest - Execute
npm run prep
to install dependencies and set up your development database - Execute
npm run dev
to launch the project in a dev server - Visit your app by navigating Chrome to
http://localhost:3000
You can optionally run frontend and backend separately. Instead of npm run dev
:
npm run frontend
npm run backend
(or use the VSCode's integrated Node debugger to launch the backend)
- Admin, username:
admin
password:admin
- Non-admin, username:
foo
password:1234
- Anonymous users can answer multiple-choice questions, but stats aren't stored.
- Registered users have access to their stats stored in the backend.
- Admin users can create new and edit existing questions.
- Feel free to register additional accounts (will be non-admin).
npm test
runs all tests.
The test
script kills the development server because tests need to spin up a testing db
and free port 9000. To restart nodemon just type rs
in the terminal of the dev
script,
or restart your debugger.
npm run ketchup
resets your local files to the last push by your instructor toorigin/codealong
.npm run ketchupfull
in addition to the above reinstalls dependencies and resets the database.
Please remember to check the package.json
file to see all available scripts.