GitHub GitHub

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 via merge() and nest(). See Routing.
  • Middleware — Global via use(), per-route inline, or scoped to merged/nested routers. See Middleware.
  • Response methodstxt(), 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() and createSignedCookies(). 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 .env file loading via loadEnv() and getEnv() with type conversion. See Env Variables.
  • Templating (STE) — An integrated AST-based template engine for rendering .html files 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 handlingonError() 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.