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 quickest way to get everything up and running is to run $ npm run setup. Then go to http://localhost:3000/ in your browser.
For more information on what is occurring in that setup script, continue reading below.
Run $ npm run to see the list of commands available. To see what each command does, look at package.json.
The app uses a basic Express file structure, and includes SQL files to set up the schema and import data.
If you ran $ npm run setup, your database should be setup and ready to go but if you're having difficulties or want to know more about what that setup command did, here's a breakdown:
npm installThis gives you all the node modules you need.npm run db:dropIf you already have a db called Vinyl on your machine, this will delete it.npm run db:createThis will create a new database called Vinyl.npm run db:schemaThis will create tables in your database for users, reviews, and albums.npm run db:seedThis populates the users, reviews, and albums tables with seed data.npm run load-session-storeThis creates a table called session that will be used for session storage with express-session and connect-pg-simplenpm run devThis starts the server using nodemon so you can run Vinyl in your browser at http://localhost:3000/
If you find yourself playing around with the schema or adding and deleting so many reviews that you just want to reset the database to its original seed data, run npm run db:reset
This command will:
npm run db:dropDrop existing vinyl databasenpm run db:createCreate vinyl databasenpm run db:schemaCreate tablesnpm run db:seedPopulate seed-datanpm run load-session-storeCreate session storage table