Repository navigation
v1.2.0
New Features
- Integrate a simple template engine called
STEintoLiteNodefor rendering HTML files. - Extend response object with multiple utility methods.
Details
STEallows you to render.htmlfiles located in theviewsfolder or in any sub-folders within theviewsfolder.STErenders an HTML template with the provided data and sends it as the response.STErenders an included HTML template within another template.- Included templates have access to the data object of their parent(s).
- The
html_property ofSTEallows to directly inject HTML content into templates. - The
renderToFilemethod ofLiteNodeprovides 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,.statusand.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
redirectmethod. - Extend response with
txtmethod. - Extend response with
jsonmethod. - Extend response with
statusmethod. - Extend response with
sendFilemethod. - Add
renderToFileto TypeScript file definition. - Update
package.jsonandREADME.md