johnpapa / lite-server

Lightweight node server
MIT License
2.31k stars 267 forks source link

Silent mode and not open a new browser on start #84

Closed Foxandxss closed 8 years ago

Foxandxss commented 8 years ago

For angular.io we use http-server to run e2e tests, but for certain reasons we would need to swap to lite-server to run the e2e. The default verbose mode and the fact that opens a new browser when it runs are problematic for this tho.

I talked with @johnpapa and he agreed that two options to make the output completely silent and and an option to disable the auto opening of the browser are nice to have.

I would really really appreciate if one of the team members in here that knows how this server work make this options available. I have no knowledge about lite-server or browser sync and I discovered that we need to use this for e2e just in the middle of a very big PR :/

Thanks!

Foxandxss commented 8 years ago

Oh, seems like I am not in a hurry anymore. Still nice to have options, will peek if no one is willing to.

johnpapa commented 8 years ago

These settings in thebs-config.js should do it ... may not need a PR at all. Let us know

  open: false
  logLevel: "silent",
  server: {
    middleware: {
      0: null
    }
  }
Foxandxss commented 8 years ago

That works nice John. Would be lovely to remove this as well:

[1] ** browser-sync config **
[1] { injectChanges: false,
[1]   files: [ './**/*.{html,htm,css,js}' ],
[1]   watchOptions: { ignored: 'node_modules' },
[1]   server: { baseDir: './', middleware: [ [Function] ] },
[1]   open: false,
[1]   logLevel: 'silent' }
[0] 13:21:02 - Compilation complete. Watching for file changes.

But muuch better than before.

Since my PR is on hold and we are not sure what is going to come. Let's close this and speak later if needed.

johnpapa commented 8 years ago

try the silent branch

Foxandxss commented 8 years ago

No luck, outputs the same thing.

johnpapa commented 8 years ago

ah, sorry ... still waking up. try again

Foxandxss commented 8 years ago

Purrfect.

johnpapa commented 8 years ago

closed with #85