Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ms-cloudpack/create-express-app

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/create-express-app - npm Package Compare versions

Comparing version 1.4.4 to 1.5.0

1

lib/createExpressApp.d.ts

@@ -9,2 +9,3 @@ /// <reference types="node" resolution-mode="require"/>

hostname?: string;
requestHeaders?: Record<string, string>;
sslOptions?: HttpsConfig;

@@ -11,0 +12,0 @@ setupCallback?: (app: Express, baseUrl: string) => void | Promise<void>;

@@ -9,3 +9,3 @@ import compression from 'compression';

export async function createExpressApp(options) {
const { setupCallback, hostname, sslOptions, requireSpecifiedPort, publicDir, portRange: ports, middlewareMode, } = options;
const { setupCallback, hostname, requestHeaders = {}, sslOptions, requireSpecifiedPort, publicDir, portRange: ports, middlewareMode, } = options;
const portRange = typeof ports === 'number' ? [ports] : ports;

@@ -27,2 +27,8 @@ if (requireSpecifiedPort && (portRange === undefined || portRange.length === 0)) {

app.use(compression());
app.use((_, res, next) => {
for (const [headerName, headerValue] of Object.entries(requestHeaders)) {
res.setHeader(headerName, headerValue);
}
next();
});
if (publicDir !== undefined) {

@@ -29,0 +35,0 @@ app.use(express.static(publicDir, { index: false }));

4

package.json
{
"name": "@ms-cloudpack/create-express-app",
"version": "1.4.4",
"version": "1.5.0",
"description": "Helper for creating an express app server, abstracting a common plugin setup.",

@@ -17,3 +17,3 @@ "license": "MIT",

"dependencies": {
"@ms-cloudpack/config-types": "^0.5.1",
"@ms-cloudpack/config-types": "^0.6.0",
"@ms-cloudpack/path-utilities": "^2.6.0",

@@ -20,0 +20,0 @@ "@types/express": "^4.17.16",

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