@astrojs/node
Version:
Deploy your site to a Node.js server
12 lines (11 loc) • 473 B
TypeScript
import type { NodeApp } from 'astro/app/node';
import type { Options, RequestHandler } from './types.js';
/**
* Creates a middleware that can be used with Express, Connect, etc.
*
* Similar to `createAppHandler` but can additionally be placed in the express
* chain as an error middleware.
*
* https://expressjs.com/en/guide/using-middleware.html#middleware.error-handling
*/
export default function createMiddleware(app: NodeApp, options: Options): RequestHandler;