@x1.co/core
TypeScript icon, indicating that this package has built-in type declarations

3.6.0 • Public • Published

@x1.co/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": {
  "@x1.co/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.

/@x1.co/core/

    Package Sidebar

    Install

    npm i @x1.co/core

    Weekly Downloads

    5

    Version

    3.6.0

    License

    MIT

    Unpacked Size

    24.1 MB

    Total Files

    820

    Last publish

    Collaborators

    • mchiang
    • szhangx1