Skip to content

Zoz24/cen4020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cen4020

Initial Setup:

  1. Ensure you have postgres installed.
  2. In postgres:
  3. setup a user and password (can use the postgres super user)
  4. Create a database called cen4020
  5. use "/c cen4020" to connect to the database
  6. Enter the following command (still in postgres):
CREATE TABLE users
( 
    username TEXT PRIMARY KEY, 
    password TEXT, 
    fname TEXT, 
    lname TEXT, 
    DOB DATE, 
    favoriteTeam TEXT, 
    favoritePlayer TEXT
);
  1. Close postgres
  2. Open terminal
  3. git clone the repository
  4. Go to the server folder
  5. Create a file named db.js
  6. Copy paste the following code into db.js
const Pool = require("pg").Pool;

const pool = new Pool({
  user: "replaceWithYourPostgresUser", 
  password: "replaceWithYourPostgresPassword", 
  host: "localhost", 
  port: 5432, 
  database: "cen4020
});

module.exports = pool;
  1. Replace the postgres user/password with your own in the above copy pasted code
  2. Save db.js then close the file.
  3. Back in the terminal, still in the server folder, run "npm install"
  4. Then, run "node index.js", still in the server folder
  5. Keep this terminal open, open a second terminal
  6. Go to the client/my-app folder
  7. Run "npm install"
  8. Run "npm start"
  9. The application should open in your web browser.

Running after initial setup:

  1. Open terminal
  2. Go to the server folder
  3. run "node index.js"
  4. Keep this terminal open, open a second terminal
  5. Go to the client/my-app folder
  6. Run "npm start"
  7. The application should open in your web browser.

About

project for software engineering class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published