Skip to content

Rate My Course, a RESTful API for university course reviews

Notifications You must be signed in to change notification settings

theharrychen/rmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate My Course RESTful API

API Documentation

Setup and Run

  • Install NodeJS

  • Install PostgreSQL with pgAdmin

    • When installing PostgreSQL, use the default settings and take note of the password you use for it. The password will be used as an environment variable for connecting to your local PostgreSQL database server.
    • After installation, make sure the PostgresSQL service is running.
      • On Windows, you can check by going to Task Manager > Services
  • Clone the repository

  • Run npm i to install all the required packages.

  • In the main directory of the project create a .env file with this content:

    • Make sure you enter your password for PGPASSWORD in the .env
    PORT=3000
    PGHOST=localhost
    PGUSER=postgres
    PGDATABASE=postgres
    PGPASSWORD=***REPLACE_WITH_POSTGRES_PASSWORD***
    PGPORT=5432
    RMCDATABASE=rmc
    
  • Create the database (same name as .env's RMCDATABASE): npx db-migrate db:create rmc

    • To delete the database: npx db-migrate db:drop rmc
  • Setup and seed the database: npx db-migrate up -e rmc

    • To undo the seeding: npx db-migrate down -e rmc
  • For development purposes, run: npx nodemon

  • Otherwise, run: node app.js

  • To directly query the database, open pgAdmin and login and connect to your local PostgreSQL server.

About

Rate My Course, a RESTful API for university course reviews

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published