fac-13 / HEII-topics

website where you can log in, post topics and vote on topics
https://heii-voting-topics.herokuapp.com/
2 stars 1 forks source link

HEII-topics

Welcome to HEII's topic board! Here you can post a topic (with a name and description), and vote on the topic (yes or no), but only if you are registered and log in with our site.

User Stories

How to run the project locally

  1. git clone https://github.com/fac-13/HEII-topics.git
  2. Run npm i to install the required modules.
  3. Set up the local database by:
    1. Connect to postgres, either by psql (pgcli) in the terminal on MAC, and sudo -u postgres psql on ubuntu.
    2. Create the database by typing CREATE DATABASE [the name of the database];. It's best not to use a hyphen (-) or uppercase letters in your database name.
    3. Create a superuser with a password - type in CREATE USER [the new username] WITH SUPERUSER PASSWORD '[the password of the database]';
    4. Change ownership of the database to the new user by typing ALTER DATABASE [name of the database] OWNER TO [the new username];
  4. Add a .env file (with no name) in the root folder and add the database's url in this format:

    DB_URL = [the heroku database]
    TEST_DB_URL = postgres://[username]:[password]@localhost:5432/[databasename]
    
    SECRET = TAKA
  5. Exit postgres and the run npm run build to build the database. (or Build the database by connecting to postgres and typing \i + correct path + /ToVaHayGi/src/database/db_build.sql)
  6. You should now be able to run tests (using npm test) and also run npm start (or npm run dev) and access the site at localhost:4000.
    • NB: There is currently no logout option - delete the jwt within the Cookie section of your local browser to log out).

FAC Project Requirements met

Key Project Database Requirements (week 1)

Key Project Authentication Requirements (week 2)

Stretch goals

Our journey 🛫

What we found difficult