Skip to content

Commit

Permalink
add prebuild script and vercel.json configuration for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
fityannugroho committed Dec 21, 2023
1 parent d2d2ef9 commit 91daad1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"url": "https://github.com/fityannugroho/idn-area"
},
"scripts": {
"prebuild": "npm run prisma:gen",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"prisma:gen": "tsx prisma/generate.ts",
Expand Down
14 changes: 14 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"rewrites": [
{
"source": "/(.*)",
"destination": "dist/src/main.js"
}
],
"functions": {
"dist/src/main.js": {
"runtime": "@vercel/node"
}
}
}

0 comments on commit 91daad1

Please sign in to comment.