Skip to content

SweepIn-ITB/SweepIn-BE

Repository files navigation

SweepIn-BE

Class Diagram

Project Setup

  1. Initialize Project and Install Dependencies
npm init -y
npm i express dotenv cors express-validator @prisma/client
npm i -D typescript @types/node @types/express @types/dotenv @types/cors
npm i --save-dev prisma esbuild-register nodemon
  1. Initialize Prisma
npx prisma init --datasource-provider mongodb

How to run

  1. Install dependencies
npm install
  1. Make sure the database is up to date to the schema
npx prisma db push
  1. Seed the database (optional)
npx prisma db seed
  1. Create a .env file in the root directory and add the following environment variables
.env.example

DATABASE_URL=mysql://user:password@localhost:3306/mydb
PORT=1337
STORAGE_BUCKET=sweepin.xxx.com
NEXT_PUBLIC_BASE_URL=http://localhost:3000
  1. Run the server
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages