GithubHelp home page GithubHelp logo

pseigo / warehouse-inventory-database-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nuxeric/cpsc304project

0.0 1.0 1.0 167 KB

web inventory system prototype [Express, EJS, PostgreSQL]

Shell 0.25% TypeScript 54.52% CSS 1.03% HTML 39.72% Dockerfile 0.35% JavaScript 4.13%
express postgresql ejs

warehouse-inventory-database-system's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.