-
In the repo root directory, run
npm install
to gather all dependencies. -
Next,
npm run seed
will seed the local SQLite database. Warning: This will drop the database if it exists. The database lives in a local filedatabase.sqlite3
. -
Then run
npm start
which should start both the server and the React client. -
To run the tests use
npm run test
Node version used: 16.15.0
- Added helmet for protection on HTTP requests
- Added cors to prevent malicius cross domain requests
- Added a middleware to control admin access
- Transactions for DB modifications
- EsLint and Prettier
- Added a few test cases using Jest and Supertest
-
Use profile_id 1 as a admin for the admin endpoints (other users are not "admin")
-
There's a JSON file that can be imported into Postman to test all the requests