Skip to content

huydoanx305/hithaui-api

Repository files navigation

hithaui-api

Installation

# install volta
$ curl https://get.volta.sh | bash
$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Set up Prisma with MySQL

  1. Create and update .env file for variables environment
DATABASE_URL="mysql://username:password@host:port/database_name"
  1. Open .env and adjust the DATABASE_URL environment variable
DATABASE_URL="mysql://username:password@host:port/database_name"

Run the following command to initialize and run MySQL on docker (optional)

$ docker-compose up -d
  1. Generate prisma schema
$ npm run prisma:generate
  1. Generate SQL migration files
$ npm run prisma:migrate
  1. Seeding database
$ npm run seed

Or run the following command to start the database including generate, migrate and seeding

$ npm run start:db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published