A community for record enthusiasts to review their favorite albums.
Part of the application has already been built for you. Your job is to take it to completion.
The app uses a simple file structure for an Express web app server that renders views using EJS templates.
public/ # static assets
src/
actions/ # async server actions (e.g. data CRUD)
data/ # db schema & seed data
db/ # database client & utils
routes/ # express routes
views/ # html templates
test/ # test files for the source files
Use the following commands to set up and seed your database:
- Create PostgreSQL database
cafe
:$ npm run db:create
- Set up database tables from
schema.sql
:$ npm run db:schema
- Load seed data from
albums.sql
:$ npm run db:seed
Run the command in the terminal so that the config loads correctly
$ cp .env.template .env
Run the following command in the terminal:
$ npm install
Run the following command in the terminal:
$ npm start
During the interview you will have 75 minutes to complete all the specs of the challenge.
You'll be allowed to ask your interviewer clarifying questions and can use the internet to search for information as needed.
Each requirement is assigned a point value. A fully complete requirement will earn you full points; partially complete requirements get partial points; incomplete requirements get no points. Overall completeness is determined by dividing the total points earned by the total points available. There is a requirement of completion of 80% of the specs to secure a passing result.
- implement feature for users to submit reviews
- reviews should be displayed on page without refreshing
- users should also see other reviews on the same page
Testing:
- 30: Write a test for the
add review
action using Mocha. This test should check that calling theadd review
function adds a row in the database