@tinyhttp/app
Advanced tools
Comparing version 2.0.21 to 2.0.22
@@ -16,2 +16,3 @@ /// <reference types="node" /> | ||
enableReqRoute: boolean; | ||
views: string; | ||
}>; | ||
@@ -18,0 +19,0 @@ /** |
@@ -172,3 +172,3 @@ import { STATUS_CODES, createServer } from 'http'; | ||
this.noMatchHandler = (options === null || options === void 0 ? void 0 : options.noMatchHandler) || this.onError.bind(null, { code: 404 }); | ||
this.settings = options.settings || { xPoweredBy: true }; | ||
this.settings = options.settings || { xPoweredBy: true, views: process.cwd() }; | ||
this.applyExtensions = options === null || options === void 0 ? void 0 : options.applyExtensions; | ||
@@ -210,3 +210,3 @@ this.attach = (req, res) => setImmediate(this.handler.bind(this, req, res, undefined), req, res); | ||
render(file, data = {}, cb, options = {}) { | ||
options.viewsFolder = options.viewsFolder || `${process.cwd()}/views`; | ||
options.viewsFolder = options.viewsFolder || this.settings.views || `${process.cwd()}/views`; | ||
options.ext = options.ext || file.slice(file.lastIndexOf('.') + 1) || 'ejs'; | ||
@@ -213,0 +213,0 @@ options._locals = options._locals || {}; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { IncomingMessage } from 'http'; | ||
@@ -3,0 +6,0 @@ import { ParsedUrlQuery } from 'querystring'; |
{ | ||
"name": "@tinyhttp/app", | ||
"version": "2.0.21", | ||
"version": "2.0.22", | ||
"description": "0-legacy, tiny & fast web framework as a replacement of Express", | ||
@@ -38,3 +38,3 @@ "type": "module", | ||
"@tinyhttp/req": "2.0.13", | ||
"@tinyhttp/res": "2.0.16", | ||
"@tinyhttp/res": "2.0.17", | ||
"@tinyhttp/router": "2.0.5", | ||
@@ -41,0 +41,0 @@ "header-range-parser": "1.1.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26301
601
+ Added@tinyhttp/res@2.0.17(transitive)
- Removed@tinyhttp/res@2.0.16(transitive)
Updated@tinyhttp/res@2.0.17