-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from newsdaycom/upgrades
Upgrades
- Loading branch information
Showing
8 changed files
with
1,935 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import winston from 'winston'; | ||
|
||
const log_format = [ | ||
winston.format.errors({ stack: true }), | ||
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), | ||
winston.format.json() | ||
]; | ||
|
||
if (process.env.LOG_PRETTY === 'on') { | ||
log_format.push(winston.format.prettyPrint()); | ||
} | ||
|
||
const logger = winston.createLogger({ | ||
level: process.env.LOG_LEVEL || 'info', | ||
format: winston.format.combine(...log_format), | ||
defaultMeta: { hostname: process.env.HOSTNAME || 'localhost' }, | ||
transports: [new winston.transports.Console()] | ||
}); | ||
|
||
export default logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,38 @@ | ||
{ | ||
"name": "express-docker-template", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "npx eslint --fix --ext 'js' .; npx webpack watch --mode development", | ||
"dev": "npx eslint --fix --ext 'js,cjs,mjs' .; npx webpack watch --mode development", | ||
"build": "echo 'Building production pack'; npx eslint --fix --ext 'js' .; npx webpack --mode production", | ||
"start": "node ./bin/server.js" | ||
"start": "node ./bin/server.js", | ||
"lint:fix": "npx eslint --fix --ext 'js,cjs,mjs' ." | ||
}, | ||
"dependencies": { | ||
"cookie-parser": "^1.4.4", | ||
"debug": "^2.6.9", | ||
"express": "^4.16.1", | ||
"http-errors": "^2.0.0", | ||
"morgan": "^1.9.1" | ||
"morgan": "^1.9.1", | ||
"winston": "^3.11.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.0", | ||
"@babel/eslint-parser": "^7.17.0", | ||
"@babel/preset-env": "^7.18.0", | ||
"babel-loader": "^8.2.5", | ||
"eslint": "^8.16.0", | ||
"@babel/core": "^7.23.9", | ||
"@babel/eslint-parser": "^7.23.10", | ||
"@babel/preset-env": "^7.23.9", | ||
"babel-loader": "^9.1.3", | ||
"eslint": "^8.56.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-proposal": "^2.3.3", | ||
"eslint-webpack-plugin": "^3.1.1", | ||
"nodemon": "^2.0.22", | ||
"nodemon-webpack-plugin": "^4.8.0", | ||
"terser-webpack-plugin": "^5.3.3", | ||
"webpack": "^5.72.1", | ||
"webpack-cli": "^4.9.2", | ||
"webpack-dev-server": "^4.9.0" | ||
"eslint-webpack-plugin": "^4.0.1", | ||
"nodemon": "^3.0.3", | ||
"nodemon-webpack-plugin": "^4.8.2", | ||
"terser-webpack-plugin": "^5.3.10", | ||
"webpack": "^5.90.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.