Look at the Nuxt 3 documentation to learn more.
Make sure to install the dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
Create a .env file with the following information:
Key | Value |
---|---|
DATABASE_URL | URL to connect to the database. (eg) postgresql://<user>:<password>@<host>:<port>/<database>?schema=<schema> |
JWT_KEY | A secret string to encrypt the JWT |
BCRYPT_SALT | A number (I used 10). Do not change this after initial use. |
// Example
// .env
DATABASE_URL="postgresql://postgres:password@localhost:5432/mentoring?schema=public"
JWT_KEY="<SOME SECRET KEY>"
BCRYPT_SALT=10
You need to generate Prisma types and make sure that it is up to date with the DB
npm run prisma-generate
npm run db_push
If this is the initial use, you need to create an admin account so that you can create other accounts:
npm run create-user <username> <password> 3
You can create departments here or directly in the DB
npm run create-dept <dept_id eg. CSE> <full name eg. Computer Science>
Start the development server on http://localhost:3000
:
# npm
npm run dev
# pnpm
pnpm run dev
# yarn
yarn dev
Build the application for production:
# npm
npm run build
# pnpm
pnpm run build
# yarn
yarn build
You can deploy the site using
node .output/server/index.mjs
Check out the deployment documentation for more information.