We are currently working on a new version of the documentation.

Express

Mount the vs3 request handler in Express.

vs3 provides toExpressHandler to map your storage.handler to Express middleware. Mount it at the path your client calls (default: /api/storage).

Basic Setup

src/index.ts

import express from "express";
import { toExpressHandler } from "vs3/integrations/express";
import { storage } from "./storage";

const app = express();
app.use("/api/storage", toExpressHandler(storage.handler));

app.listen(3011);

Next Steps