Skip to content

v1.2.0

Choose a tag to compare

@LebCit LebCit released this 09 Jun 05:46
· 129 commits to main since this release

New Features

  • Integrate a simple template engine called STE into LiteNode for rendering HTML files.
  • Extend response object with multiple utility methods.

Details

  • STE allows you to render .html files located in the views folder or in any sub-folders within the views folder.
  • STE renders an HTML template with the provided data and sends it as the response.
  • STE renders an included HTML template within another template.
  • Included templates have access to the data object of their parent(s).
  • The html_ property of STE allows to directly inject HTML content into templates.
  • The renderToFile method of LiteNode provides a convenient way to generate static HTML files from templates.
  • LiteNode's response object has been extended with multiple methods to manipulate with ease the server's response: .redirect, .txt, .json, .status and .sendFile.

A detailed explanation with examples can be found on LiteNode's documentation site

Changes

  • Integrate STE into LiteNode with renderToFile method.
  • Extend response with redirect method.
  • Extend response with txt method.
  • Extend response with json method.
  • Extend response with status method.
  • Extend response with sendFile method.
  • Add renderToFile to TypeScript file definition.
  • Update package.json and README.md