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);
});
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));
- 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>`));
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.
Important as a fork of express will be compatible some, probably some others have stopped in the future.