This repository has been archived on 2024-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
Matheus Sampaio Queiroga
9dd93d4b24
Publish v3.1.2
Some checks failed
Teste / Test in node ${{ matrix.node }} (14.x) (push) Successful in 54s
Teste / Test in node ${{ matrix.node }} (15.x) (push) Failing after 34s
Teste / Test in node ${{ matrix.node }} (16.x) (push) Failing after 31s
Teste / Test in node ${{ matrix.node }} (17.x) (push) Failing after 36s
Teste / Test in node ${{ matrix.node }} (18.x) (push) Successful in 43s
Teste / Test in node ${{ matrix.node }} (19.x) (push) Successful in 44s
Teste / Test in node ${{ matrix.node }} (20.x) (push) Successful in 45s
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.
Languages
TypeScript
100%