Skip to content

Adityadln/nitt-mentoring

 
 

Repository files navigation

Nuxt 3 Minimal Starter

Look at the Nuxt 3 documentation to learn more.

Setup

Make sure to install the dependencies:

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

Prerequisites

ENV

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

ORM

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

INITIAL USE

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>

Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

Production

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 79.3%
  • TypeScript 20.3%
  • Other 0.4%