Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nextjs-server-modules

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextjs-server-modules - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

4

nsm/index.ts

@@ -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],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc