Setup (One Time Only)
Assuming Node 20 LTS is installed
- Go to frontend repo in terminal. For eg:
cd interncomp-frontend. - Do
git pulljust in case. - Run
npm install
Running frontend
To run, use npm run dev
Firstly, we need to setup database. Assuming Postgresql is installed, and make sure service is running.
Run in terminal: sudo -u postgres psql -U postgres
Then in postgres:
postgres=# CREATE USER test WITH PASSWORD 'password';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE "interncomp-database" TO test;
GRANT
postgres=# ALTER USER test WITH SUPERUSER;
ALTER ROLE
postgres=# exitContinue with backend setup
Backend Setup (One Time Only)
Assuming Node 20 LTS and Postgresql is installed
npx prisma generate
npm install
npx prisma migrate dev --name initRunning backend
To run, use npm run dev