0.0.7 • Published 4 months ago

vercel-nest v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Vercel-nest

Vercel builder for Nestjs

Help you to deploy Nestjs application on Vercel in SSR mode

Usage

1. Add build command to package.json

{
  "scripts": {
    "build": "nest build"
  }
}

1. Configure vercel-nest as builder in vercel.json

Add a vercel.json file to your project root path

{
  "builds": [
    {
      "src": "package.json",
      "use": "vercel-nest"
    }
  ]
}

Support Swagger-ui

{
  "builds": [
    {
      "src": "package.json",
      "use": "vercel-nest",
      "config": {
        // change "docs" to your 'path' of SwaggerModule.setup(path, app, document);
        "swagger": "docs"
      }
    }
  ]
}

How to work

  1. Using the npm run build command to build the project. You need to define the build command in your package.json, for example:
{
  "scripts": {
    "build": "nest build"
  }
}
  1. Using dist/main.js as the entry point of the program, and retrieve all its dependency files to build the Vercel Lambda function, named index.

  2. Define a routes to forward all requests to index.

0.0.7

4 months ago

0.0.6

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago