Socket
Socket
Sign inDemoInstall

server

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

server - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31

coverage/lcov-report/server/error/index.html

6

package.json
{
"name": "server",
"version": "1.0.30",
"version": "1.0.31",
"description": "A modern and powerful server for Node.js",

@@ -8,3 +8,5 @@ "homepage": "https://serverjs.io/",

"bugs": "https://github.com/franciscop/server/issues",
"funding": "https://www.paypal.me/franciscopresencia/19",
"funding": {
"url": "https://www.paypal.me/franciscopresencia/19"
},
"author": "Francisco Presencia <public@francisco.io> (https://francisco.io/)",

@@ -11,0 +13,0 @@ "license": "MIT",

const express = require('express');
const hbs = require('hbs');
const path = require('path');

@@ -31,3 +33,3 @@ module.exports = {

},
init: ctx => {
init: async ctx => {
ctx.express = express;

@@ -44,4 +46,17 @@ ctx.app = ctx.express();

// Add the views into the core
if (path.resolve(ctx.options.views) === path.resolve(process.cwd())) {
throw new Error(
'The "views" option should point to a subfolder of the project and not the root of it'
);
}
await new Promise(function(resolve, reject) {
hbs.registerPartials(ctx.options.views, function(err) {
if (err) reject(err);
resolve();
});
});
// Accept HTML as a render extension
ctx.app.engine('html', require('hbs').__express);
ctx.app.engine('html', hbs.__express);

@@ -48,0 +63,0 @@ if (ctx.options.engine) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc