About LiteNode
Overview
LiteNode is a lightweight, modular Node.js web framework built to provide essential web server functionality with a clean and intuitive API. It has zero external dependencies, leverages modern JavaScript, and is built exclusively as an ES module — require() is not supported.
It is designed for developers who want a straightforward yet capable foundation — without the overhead of larger frameworks.
What LiteNode Includes
- Routing — GET, POST, PUT, DELETE, PATCH, and
any(). Named parameters, optional parameters, wildcard and catch-all routes, and nested routers viamerge()andnest(). See Routing. - Middleware — Global via
use(), per-route inline, or scoped to merged/nested routers. See Middleware. - Response methods —
txt(),html(),xml(),json(),sendFile(),redirect(),status(). See Response Methods. - Body parsing — Automatic for JSON, URL-encoded, and multipart/form-data. No setup needed. See Body Parsing.
- Cookie management — Parse, set, clear, and sign cookies with
enableCookieParser()andcreateSignedCookies(). See Cookies. - Static file serving — Auto-serves a directory with ETag caching and live file watching — no restart needed. See Static Files.
- Environment variables — Native
.envfile loading vialoadEnv()andgetEnv()with type conversion. See Env Variables. - Templating (STE) — An integrated AST-based template engine for rendering
.htmlfiles with variables, conditionals, loops, includes, filters, and static file generation. See Templating and STE Filters. - Markdown — Parse files, extract frontmatter, group by property, paginate, and generate table of contents. See Markdown.
- Error handling —
onError()for runtime errors,notFound()for 404s. See Error Handling.
Use Cases
LiteNode is well-suited for:
- Small to medium web applications
- REST APIs and microservices
- Static site generation (SSG)
- Blogs, documentation sites, and content-driven apps
- Prototyping and MVPs
Origins
LiteNode's routing system is built on the foundation of Velocy, extended and improved to provide a complete development experience. You can read the full story in LiteNode, Node.js Web Framework.
License
LiteNode is licensed under the MIT License. See the LICENSE file for details.
Issues
Found a bug or have a suggestion? Please open an issue on the GitHub Issues page.
Contributing
Contributions are welcome. Fork the repository and submit a pull request with your changes.
Author
LiteNode is authored by LebCit.