Repository navigation
v1.1.0
New Feature
- Add option to initiate a
LiteNodeinstance without specifying a static asset directory. - Apply middleware(s) in merged and nested routes only to the specified route.
Details
In the previous version, creating a LiteNode instance without an existing static asset directory would trigger a warning message.
Starting v1.1.0 LiteNode can be used without a static asset folder and avoid warning messages:
const app = new LiteNode("__NO_STATIC_DIR__")This "__NO_STATIC_DIR__" string will do the following:
- Skip serving static assets and avoid logging warnings to the console.
- Apply middleware(s) to specified route only in merged and nested routes.
More about the second aspect, with details and example, in the Merging and Nesting with Middlewares section of the documentation.
Changes
- Unify CJS and MJS versions of
LiteNodeinto one file "litenode.js". - Check for
__NO_STATIC_DIR__uponLiteNode's initialization. - Set nested instance(s) of
LiteNodeto skip serving static assets by default to prevent unintended traversal of their middleware(s) in the reverse direction. - Update README with example for
mergeandnestwith middleware(s)