2.0.6 • Published 5 months ago

neste v2.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm Teste

A fork of express with patches and improvements for new integrations, fixes and more.

import neste from "neste";
const app = neste();

app.get("/", (req, res) => res.send("hello world"));
app.get("/json", (req, res) => res.json({message: "hello world"}));

app.listen(3000, () => {
  console.log("Listen on %s", 3000);
});

Example

Standalone Nodejs

import neste from "neste";
const app = neste();

app.get("/", (req, res) => res.set("Content-Type", "text/html").send("<p>Hello world</p>"));

const PORT = Number(process.env.PORT || 3000);
app.listen(PORT, () => console.log("Listen on %s", PORT));

Next.js API Routes

  • path: /[...root].ts
import { Router } from "Neste";
const app = new Router();
export default app;

app.get("/", (req, res) => res.send(`<p>Hello from root API</p>`));
  • path: /form/[...formsSlugs].ts
import { Router } from "Neste";
const app = new Router({ "app path": "/form" });
export default app;

app.get("/", (req, res) => res.send(`<p>Hello from forms router</p>`));

3.x notice

version 3.0.0 is removing support for CommonJS, keeping only the ESM module. if you app/module is Commonjs module migrate to ESM or keep on ExpressJS.

Express middleware's

Important as a fork of express will be compatible some, probably some others have stopped in the future.

3.1.2

5 months ago

3.1.1

5 months ago

3.0.0

6 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.6

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

1.0.2

1 year ago

1.0.1

1 year ago