Maxmi / sample-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cafe

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.

Getting Started

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

Setting Up Your Database

Use the following commands to set up and seed your database:

  1. Create PostgreSQL database cafe: $ npm run db:create
  2. Set up database tables from schema.sql: $ npm run db:schema
  3. Load seed data from albums.sql: $ npm run db:seed

Setting up your config

Run the command in the terminal so that the config loads correctly $ cp .env.template .env

Installing your dependencies

Run the following command in the terminal: $ npm install

Starting your development server

Run the following command in the terminal: $ npm start

Coding Challenge

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.

Specs

Reviews

  • 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

Testing:

  • 30: Write a test for the add review action using Mocha. This test should check that calling the add review function adds a row in the database

Redirect

About

License:MIT License


Languages

Language:JavaScript 69.7%Language:HTML 29.0%Language:CSS 1.2%