vercel-express

Vercel Express and UI Webapp Example.

Live Demo - https://vercel-express-3.ngduc.vercel.app

Set up & Deploy with Vercel

$ npm install vercel -g
$ npm install
$ vercel
  • If you're using Typescript, build your source directory, output to "app"
  • Update package.json: "main": "app/index.js"
  • Map API routes (/api/...) and static (UI) routes (/...).
  • Environment variables - examples:
    • $ vercel secrets add my-mongodb-uri mongodb+srv://<user>:<password>@clusteridxxx.mongodb.net/<database-name>?retryWrites=true
    • add "env" to vercel.json { "env": { "MONGODB_URI": "@my-mongodb-uri" }, ... }

Links