express-generator-typescript 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34,12 +34,12 @@ app.use(express.urlencoded({extended: true}));
|
|
|
34
34
|
app.use(cookieParser(EnvVars.CookieProps.Secret));
|
|
35
35
|
|
|
36
36
|
// Show routes called in console during development
|
|
37
|
-
if (EnvVars.NodeEnv === NodeEnvs.Dev) {
|
|
37
|
+
if (EnvVars.NodeEnv === NodeEnvs.Dev.valueOf()) {
|
|
38
38
|
app.use(morgan('dev'));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Security
|
|
42
|
-
if (EnvVars.NodeEnv === NodeEnvs.Production) {
|
|
42
|
+
if (EnvVars.NodeEnv === NodeEnvs.Production.valueOf()) {
|
|
43
43
|
app.use(helmet());
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -54,7 +54,7 @@ app.use((
|
|
|
54
54
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
55
|
next: NextFunction,
|
|
56
56
|
) => {
|
|
57
|
-
if (EnvVars.NodeEnv !== NodeEnvs.Test) {
|
|
57
|
+
if (EnvVars.NodeEnv !== NodeEnvs.Test.valueOf()) {
|
|
58
58
|
logger.err(err, true);
|
|
59
59
|
}
|
|
60
60
|
let status = HttpStatusCodes.BAD_REQUEST;
|
|
@@ -34,12 +34,12 @@ app.use(express.urlencoded({extended: true}));
|
|
|
34
34
|
app.use(cookieParser(EnvVars.CookieProps.Secret));
|
|
35
35
|
|
|
36
36
|
// Show routes called in console during development
|
|
37
|
-
if (EnvVars.NodeEnv === NodeEnvs.Dev) {
|
|
37
|
+
if (EnvVars.NodeEnv === NodeEnvs.Dev.valueOf()) {
|
|
38
38
|
app.use(morgan('dev'));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// Security
|
|
42
|
-
if (EnvVars.NodeEnv === NodeEnvs.Production) {
|
|
42
|
+
if (EnvVars.NodeEnv === NodeEnvs.Production.valueOf()) {
|
|
43
43
|
app.use(helmet());
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -54,7 +54,7 @@ app.use((
|
|
|
54
54
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
55
|
next: NextFunction,
|
|
56
56
|
) => {
|
|
57
|
-
if (EnvVars.NodeEnv !== NodeEnvs.Test) {
|
|
57
|
+
if (EnvVars.NodeEnv !== NodeEnvs.Test.valueOf()) {
|
|
58
58
|
logger.err(err, true);
|
|
59
59
|
}
|
|
60
60
|
let status = HttpStatusCodes.BAD_REQUEST;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"express-generator-typescript": "node bin/cli.js",
|