Vercel builder for Nestjs
Help you to deploy Nestjs application on Vercel
{
"scripts": {
"build": "nest build"
}
}
{
"builds": [
{
"src": "package.json",
"use": "vercel-nest"
}
]
}
{
"builds": [
{
"src": "package.json",
"use": "vercel-nest",
"config": {
// change "docs" to your 'path' of SwaggerModule.setup(path, app, document);
"swagger": "docs"
}
}
]
}
- Using the
npm run build
command to build the project. You need to define the build command in yourpackage.json
, for example:
{
"scripts": {
"build": "nest build"
}
}
-
Using
dist/main.js
as the entry point of the program, and retrieve all its dependency files to build the Vercel Lambda function, namedindex
. -
Define a
routes
to forward all requests toindex
.