Socket
Socket
Sign inDemoInstall

@sls-next/core

Package Overview
Dependencies
528
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sls-next/core

Handles Next.js routing independent of provider


Version published
Maintainers
2
Weekly downloads
40,275
decreased by-8.27%

Weekly downloads

Readme

Source

@sls-next/core

Core library for running serverless Next.js apps

This decouples the core Next.js handler logic from a particular platform. The types defined are meant to be abstract to use with any provider. It provides platform-agnostic handlers that can be extended for use on specific platforms.

Code coverage relies on jest configuration:

"moduleNameMapper": {
  "@sls-next/core": "<rootDir>/packages/libs/core/src/index.ts"
},

Builds twice, both a commonjs module (dist/index.js) and an ES module (dist/module/index.js). The former is used by the serverless component, while the latter allows rollup to optimize size.

build/

Contains logic needed for building manifests.

route/

Contains routing logic.

Entry functions take manifests and request details and return Route objects.

handle/

Contains logic for handling routes.

Entry functions take manifests and Events containing request/response. They return unhandled routes or resolve the route to resp object given.

Keywords

FAQs

Last updated on 31 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc