Install the following:
- Nodejs: https://nodejs.org/en/download/
- PostgresSQL: https://www.postgresql.org/download/
- Yarn: Package manger instead of NPM
npm i yarn -g
Note: The above command will install the yarn command globally on your device.
git clone https://github.com/sophie210286/DBMS_Project.git
In your project folder's terminal:
cd website
yarn
Create a file name .env.development
in the website
folder, and fill up the following inside:
NEXT_PUBLIC_HOST=<Your hosting service; By default it runs on localhost>
NEXT_PUBLIC_DB_USER=<Your postgresql user name where the database is stored; By default it runs on postgres>
NEXT_PUBLIC_DB_PASSWORD=<Your postgresql user password>
NEXT_PUBLIC_DB_PORT=<Your Port Number; By default it runs on 5432>
NEXT_PUBLIC_DB_NAME=<Your database name>
Note: If you are running the website on localhost, then you can ignore 'By defaults' but you still need to fill the remaining ones.
- Dummy example
.env.development
NEXT_PUBLIC_HOST=localhost
NEXT_PUBLIC_DB_USER=postgres
NEXT_PUBLIC_DB_PASSWORD=password
NEXT_PUBLIC_DB_PORT=5432
NEXT_PUBLIC_DB_NAME=cdms
Use the following data file to populate your database:
- To install using
.sql
: SQL data file - To install using
.tar
: TAR data file
Note: The file will have all CREATE TABLE
, CREATE INDEX
, and INSERT INTO
commands.
yarn run dev
The website will run on http://localhost:3000 on your browser.
Path | Description |
---|---|
/public | Static files |
/pages | Web page Routes |
/styles | CSS styles |
/components | Functional components |
/utils | Database connection |
- Nextjs (Frontend and Backend)
- PostgreSQL (Database)