johnpapa / johnpapa/lite-server
How to stop verbose output to the console
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
I have lite-server setup in package.json:
```
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run scss:w\" \"npm run lite\" ",
"tsc": "tsc --inlineSourceMap --allowSyntheticDefaultImports -outDir .build/js",
"tsc:w": "tsc -w --inlineSourceMap --allowSyntheticDefaultImports -outDir .build/js",
"scss": "node-sass --include-path styles/app.scss .build/css/app.css",
"scss:w": "node-sass -w --include-path styles styles/app.scss .build/css/app.css",
"lite": "lite-server -c bs-config.json",
"typings": "typings",
"postinstall": "typings install"
},
```
with the following bs-config.json file:
```
{
"notify": false,
"files": ["./.build/css/*.css", "./.build/js/**/*.js", "./app/**/*.{html,css}", "index.html"],
"injectChanges": true,
"logLevel": "silent",
"debugInfo": false,
"ghostMode": false,
"server": { "baseDir": "." }
}
```
Upon starting I see that the bs-config.json configuration is written to te console:
```
** browser-sync config **
[2] { injectChanges: true,
[2] files:
[2] [ './.build/css/*.css',
[2] './.build/js/**/*.js',
[2] './app/**/*.{html,css}',
[2] 'index.html' ],
[2] watchOptions: { ignored: 'node_modules' },
[2] server: { baseDir: '.', middleware: [ [Function], [Function] ] },
[2] notify: false,
[2] logLevel: 'silent',
[2] debugInfo: false,
[2] ghostMode: false }
[0] 8:02:46 AM - Compilation complete. Watching for file changes.
```
Since the logLevel is set to silent, I expect to see very little info in the console.
However, each and every get is displayed:
```
[2] 16.04.23 08:02:50 200 GET /index.html
[2] 16.04.23 08:02:50 304 GET /node_modules/bootstrap/dist/css/bootstrap.min.css
[2] 16.04.23 08:02:50 304 GET /node_modules/font-awesome/css/font-awesome.min.css
[2] 16.04.23 08:02:50 304 GET /node_modules/ng2-notify/dist/css/ng2notify.css
[2] 16.04.23 08:02:50 304 GET /.build/css/app.css
[2] 16.04.23 08:02:50 304 GET /node_modules/es6-shim/es6-shim.min.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/bundles/angular2-polyfills.js
[2] 16.04.23 08:02:50 304 GET /node_modules/systemjs/dist/system-polyfills.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/es6/dev/src/testing/shims_for_IE.js
[2] 16.04.23 08:02:50 304 GET /node_modules/systemjs/dist/system.src.js
[2] 16.04.23 08:02:50 304 GET /node_modules/rxjs/bundles/Rx.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/bundles/angular2.dev.js
etc...
```
### Environment
- `lite-server` version: 2.2.0
- `nodejs` version: 5.7.1
- `npm` version: 3.8.0
- OS type/version: OSX
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.