Before running this project:
-
Install Dependecies
npm install
or
yarn
-
Create and configure the
.env
file. Example:PORT=3000 DATABASE_URL="mysql://<username>:<yourpassword>@localhost:3306/buku_db" HASH_SALT=10
Or just copy the
.env.example
file, then rename it to.env
and configure it. -
Run DB migration using prisma migration
npx prisma migrate deploy
To run in the production mode you have to build the project first, then run the start script:
npm run build
npm run start
Or you can run the project in development mode by using the build-w script and dev script
npm run build-w
then in other cli
npm run dev