This is the repo for the server of the Dental Clinic application project for the course CSC12002 - Advanced Database at HCMUS.
The docs & diagrams of the project can be found here
The repo for the UI (Client) can be found here
- Nodejs
- npm
- SQL Server
npm i
- Connect to SQL Server
- Open SQL Server Configuration Manager
- Locate
SQL Server Network Configuration
and expand it - Click on
Protocols for MSSQLSERVER
- Right-click on
TCP/IP
and selectEnable
(if it is not already enabled) - Click on the
properties
ofTCP/IP
and select theIP Addresses
tab - Scroll down to
IPAll
and set theTCP Port
to1433
(or any other port you want to use)
- .env file
- Create a
.env
file in the root directory of the project - Copy the contents of
.env.example
into.env
- Change the values of the variables in
.env
to match your SQL Server configuration - Default value for
PORT
is1433
- The script we used to create the database with the name
DentalClinicDev
is in init.sql file of thedental-clinic-database
repo. You can use it to create the database and tables. Or if you want you can restore the backup for our database used for testing here.
- Pull the db
- After you have created the database, you can pull the database to use with
prisma
, runnpx prisma db pull
in the root directory of the project - Then run
npx prisma generate
to generate the prisma client
npm run dev