@bizhermit/nexpress
v1.1.0
Published
nextjs + express application
Downloads
1
Readme
Nexpress
Give to Express and Next.js framework.
Usage
please use starter kit: @bizhermit/starter
Install
npm i @bizhermit/nexpress
Example
// ./src-nexpress/index.ts
import execute from "@bizhermit/nexpress";
execute({/* props */});
Props
execute arg (struct object) parameters.
rootDirname?: string nextjs root directory.
default:"./src"
port?: number port number.
default:3000
interceptors
- beforeSetAllRoute?: (server: core.Express, handler: RequestHandler, params: InitParams) => void
{ beforeSetAllRoute: (server, handler) => { server.all("/api/*", (req, res) => { console.log(req.url); return handler(req, res); }); }, }
- listenServer?: (server: core.Express, handler: RequestHandler, params: InitParams) => void
- listenedServer?: (server: core.Express, handler: RequestHandler, params: InitParams) => void
- beforeSetAllRoute?: (server: core.Express, handler: RequestHandler, params: InitParams) => void
preventSetAllRoute?: boolean