Skip to content

Middleware Support

Danny SMc edited this page May 13, 2021 · 3 revisions

Middleware Support

We support the standard express middleware, and a proxy has been added for this case, please note this proxies to the standard use parameter.

import { Framework } from 'rewyre';
import { Request, Response, NextFunction } from 'express';

(async () => {

	const application: Framework = new Framework({
		port: 8080,
	});

	application.useMiddleware((request: Request, response: Response, next: NextFunction): void => {
		consolelog('Hello');
	});

	await application.start();
})();

Useful Links:

Clone this wiki locally