Skip to content

fac25/week2-db-Sumithra-Joe-Paz-Abdullah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Week 2 Database

London Attractions Reviews

By: Sumithra, Joe, Abdullah, Paz

Our London attractions reviews application allows the user to review the most popular attractions

You can find our site hosted on Heroku

Setup

Make sure you have Git and Node (v18) installed.

  1. Clone this repo and cd into the directory
  2. Run npm install to install all the dependencies
  3. Run npm run dev to start the server.

This uses the nodemon library to auto-restart the server when you save changes.

Test

There is three tests:

  • Test #1 Check List Locations: query returns length of rows, name, id
  • Test #2 List Recent Posts getRecentPosts
  • Test #3 Form inserts data into Db

First Feed the test db:

npm run seedTest

To run the tests:

npm run test

Users Stories

  • As a user, I want to: submit information to your site for anyone to see
  • As a user, I want to: come back to your site later and see what I posted is still there

Acceptance Criteria

  • A form for users to submit data
  • A page showing all the data
  • Semantic form elements with correctly associated labels
  • A SQLite database
  • A schema describing your database in your README
  • Tests for server routes and database access
  • Not process user input as SQL commands
  • Hidden environment variables (i.e. not on GitHub)

Schema

Our database contain three tables.

  1. Locations
  2. sqlite seqence
  3. posts

image image image

Snapshot

image