Bibhushan Thapa
Bibhushan Thapa
Explore posts from servers
PPrisma
Created by Bibhushan Thapa on 6/12/2024 in #help-and-questions
Hosting Typescript Express Server with Prisma on Vercel
I have hosted Express Server (Javascript) with Prisma on Vercel and it is working perfectly. Now I have a app on Typescript. As Vercel only works with Js files I have used build file. So, My question is how to include the prism generate file inside the /dist folder as when building with

rimraf dist && tsc

rimraf dist && tsc
I am not getting the /generated file on the dist file. My files are: package.json
{
"name": "prisma-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "nodemon ./src/server.ts",
"dev": "nodemon ./src/server.ts",
"seed": "ts-node src/seed.ts",
"postinstall": "prisma generate",
"build": "rimraf dist && tsc && copyfiles -u 1 'src/generated/prismaClient/**/*' dist/generated/prismaClient",
"ts.check": "tsc --project tsconfig.json",
"add-build": "git add dist",
"test": "echo \"Error: no test specified\" && exit 1"
}
]
}
{
"name": "prisma-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "nodemon ./src/server.ts",
"dev": "nodemon ./src/server.ts",
"seed": "ts-node src/seed.ts",
"postinstall": "prisma generate",
"build": "rimraf dist && tsc && copyfiles -u 1 'src/generated/prismaClient/**/*' dist/generated/prismaClient",
"ts.check": "tsc --project tsconfig.json",
"add-build": "git add dist",
"test": "echo \"Error: no test specified\" && exit 1"
}
]
}
3 replies