Http-server: Can I add a hot update?

Created on 18 Feb 2019  路  2Comments  路  Source: http-party/http-server

As the title, each time you need to refresh the URL, can't you automatically refresh the webpage in the browser?

out-of-scope

Most helpful comment

I have found the tools I need.

Front page page hot update

  • live-server: http development server with built-in browser and hot update
  • anywhere: Similar to the live-server above (developed by the Chinese, it has not been updated in a year)

Nodejs hot update

  • nodemon: The nodejs program is automatically restarted after the file is modified.
  • supervisor: nodejs program run manager with hot update function (not updated in two years)

Finally, if I use webpack, I usually use webpack-dev-server. http-server is generally used to quickly start http service.

All 2 comments

That's a bit beyond scope for http-server (which isn't just for development). There are projects (usually connected to code bundlers like webpack or browserify) which watch files, (re)bundle them, and then reload your UX.

Since we don't do any file watching (and we're not likely too), then this one is beyond scope for us.

However, it could be done via a separate tool that could watch the same directory that http-server is serving out of and reload the related URL if/when the files on disk change. If you find such a tool, I'm more than happy to have it mentioned in the README.

Thanks for asking!

I have found the tools I need.

Front page page hot update

  • live-server: http development server with built-in browser and hot update
  • anywhere: Similar to the live-server above (developed by the Chinese, it has not been updated in a year)

Nodejs hot update

  • nodemon: The nodejs program is automatically restarted after the file is modified.
  • supervisor: nodejs program run manager with hot update function (not updated in two years)

Finally, if I use webpack, I usually use webpack-dev-server. http-server is generally used to quickly start http service.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducklord picture ducklord  路  5Comments

isomorphisms picture isomorphisms  路  5Comments

dKab picture dKab  路  7Comments

JonFranchi picture JonFranchi  路  6Comments

laughinghan picture laughinghan  路  5Comments