0.0.0 • Published 3 years ago

@yandeu/express-dev v0.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Express Dev

Contains some nice express wrapper function for simplifying express development.

Modules

For now, there is only one.

Express Listen

  • Tries the next port if the current is not available.
  • Provides a nice kill switch.
  • Automatically opens your browser.
const listen = new ExpressListen(app)
const openBrowser = true

listen.listen(port, openBrowser).then(port => {
  console.log(`Running on port ${port}`)
})

setTimeout(async () => {
  await listen.kill()
}, 5000)