nexp
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

🧙 Nexp

Express style API routing for Next.js

Installation

  npm i nexp --save

Usage

You can use nexp in Next.js api files like this:

import nexp from "nexp"

const router = nexp.Router();

router.set("GET", (req, res) => res.send(200));
router.set("POST", (req, res) => res.send(200));

export default router.handler();

or

import nexp from "nexp"

const router = new nexp();

router.set("GET", (req, res) => res.send(200));
router.set("POST", (req, res) => res.send(200));

export default router.handler();

Build using

  • Typescript

Licence

MIT

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i nexp

    Weekly Downloads

    0

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    4.53 kB

    Total Files

    7

    Last publish

    Collaborators

    • utkumetin