How to Deploy a Nullstack application on Vercel

Create api/nullstack.js to export the production application server.

import application from '../.production/server'

export default application.server;

Add the following vercel.json to the root folder in order to redirect all requests to nullstack:

{
  "version": 2,
  "functions": {
    "api/nullstack.js": {
      "includeFiles": ".production/**"
    }
  },
  "routes": [
    {
      "handle": "filesystem"
    },
    {
      "src": "(.*)",
      "dest": "api/nullstack.js"
    }
  ]
}