nextjs-server-modules
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -64,3 +64,5 @@ import routes from "./generated_routes" | ||
const wrappedServerFunc = (wrappers as any)(...[...middlewares, serverFunc]) | ||
const wrappedServerFunc = (wrappers as any)( | ||
...[...middlewares, serverFunc?.default || serverFunc] | ||
) | ||
@@ -67,0 +69,0 @@ await apiResolver( |
{ | ||
"name": "nextjs-server-modules", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"main": "bin.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:hello-seam/nextjs-server-modules.git", |
@@ -11,2 +11,5 @@ # NextJS Server Modules | ||
The `nextjs-server-module` cli will help you create a custom nextjs runtime | ||
to run your projects with, so they can be run without nextjs at runtime. | ||
## Usage | ||
@@ -18,9 +21,9 @@ | ||
The build process will output a `dist/index.js` file which can be used to | ||
The build process will output a `.nsm/index.ts` file which can be used to | ||
create your server or invoke requests against it | ||
```ts | ||
import myNextJSModule from "./dist/index.js" | ||
import myNextJSModule from "./.nsm" | ||
const server = await myNextJSModule.startServer({ port: 3030 }) | ||
const server = await myNextJSModule({ port: 3030 }) | ||
@@ -37,3 +40,3 @@ // your server is running on localhost:3030! | ||
```ts | ||
import myNextJSModule from "./dist/index.js" | ||
import myNextJSModule from "./.nsm" | ||
@@ -45,3 +48,3 @@ const myMiddleware = (next) => (req, res) => { | ||
const server = await myNextJSModule.startServer({ | ||
const server = await myNextJSModule({ | ||
port: 3030, | ||
@@ -48,0 +51,0 @@ middlewares: [myMiddleware], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55260
1638
80