Skip to content

web inventory system prototype [Express, EJS, PostgreSQL]

Notifications You must be signed in to change notification settings

pseigo/warehouse-inventory-database-system

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPSC 304 Project

Running the server

This will start the database and the backend server.

# To start
docker-compose up -d

# To close
docker-compose down

Anytime you make changes to the code, you will need to rebuild the backend's Docker image:

docker-compose build
docker-compose up -d

Manually running the server

Docker Compose will do this for you. No need to run this manually. Although doing npm install will help your code editor understand the code and give you tips, so that's still a good idea to do!

cd web
npm install
npm run build
npm start

Connecting to the database with psql

The debug credentials are postgres/postgres.

psql -h localhost -p 5432 -U postgres

Connect to the project's database:

postgres=# \l
                                  List of databases
    Name     |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges
-------------+----------+----------+------------+------------+-----------------------
 cpsc304_dev | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
...

postgres=# \c cpsc304_dev
psql (12.4 (Ubuntu 12.4-0ubuntu0.20.04.1), server 12.2 (Debian 12.2-2.pgdg100+1))
You are now connected to database "cpsc304_dev" as user "postgres".

cpsc304_dev=#

To load the starter data, run the initialize_db.sql script:

cpsc304_dev=# \i ./sql_script/initialize_db.sql

About

web inventory system prototype [Express, EJS, PostgreSQL]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 54.5%
  • HTML 39.7%
  • JavaScript 4.1%
  • Other 1.7%