@ms-cloudpack/create-express-app
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Tue, 15 Nov 2022 08:12:36 GMT", | ||
"date": "Tue, 22 Nov 2022 08:10:15 GMT", | ||
"tag": "@ms-cloudpack/create-express-app_v1.1.0", | ||
"version": "1.1.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "dake.3601@gmail.com", | ||
"package": "@ms-cloudpack/create-express-app", | ||
"commit": "96959421cca3058863aee2097e83a2911f6cc460", | ||
"comment": "Added option to set directory to serve as plain static assets." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Tue, 15 Nov 2022 08:13:12 GMT", | ||
"tag": "@ms-cloudpack/create-express-app_v1.0.2", | ||
@@ -8,0 +23,0 @@ "version": "1.0.2", |
# Change Log - @ms-cloudpack/create-express-app | ||
This log was last generated on Tue, 15 Nov 2022 08:12:36 GMT and should not be manually modified. | ||
This log was last generated on Tue, 22 Nov 2022 08:10:15 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 1.1.0 | ||
Tue, 22 Nov 2022 08:10:15 GMT | ||
### Minor changes | ||
- Added option to set directory to serve as plain static assets. (dake.3601@gmail.com) | ||
## 1.0.2 | ||
Tue, 15 Nov 2022 08:12:36 GMT | ||
Tue, 15 Nov 2022 08:13:12 GMT | ||
@@ -11,0 +19,0 @@ ### Patches |
@@ -10,2 +10,3 @@ /// <reference types="node" resolution-mode="require"/> | ||
setupCallback?: (app: Express) => void; | ||
publicDir?: string; | ||
}): Promise<{ | ||
@@ -12,0 +13,0 @@ server: Server; |
@@ -7,3 +7,3 @@ import express, {} from 'express'; | ||
export async function createExpressApp(options) { | ||
const { setupCallback, hostname, sslOptions, portRange } = options; | ||
const { setupCallback, hostname, sslOptions, portRange, publicDir } = options; | ||
// Get the available port. | ||
@@ -18,2 +18,5 @@ const port = await getPort({ | ||
app.use(compression()); | ||
if (publicDir !== undefined) { | ||
app.use(express.static(publicDir)); | ||
} | ||
// Call setup callback with the app. | ||
@@ -20,0 +23,0 @@ setupCallback?.(app); |
{ | ||
"name": "@ms-cloudpack/create-express-app", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Helper for creating an express app server, abstracting a common plugin setup.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
17743
315