Kokizzu
Kokizzu

Reputation: 26888

Server side programming language/framework that support hot-reload

Is there any other server side language (with or without frameworks) that support hot-reload or live-coding, so when we develop, all we need is:

  1. Start the web server
  2. Edit the source code
  3. Try on the browser (without having to restart the server)

Similar to PHP

Some other language that I know able to do this:

(* automatically restart server when there are changes, not really hot-reload

Is there any other language that are able to do this? and if possible, showing the error (filename and line number, or the full stack trace) on the browser (not in the terminal/console), so I don't have to switch from code-editor then to browser and then to console to see the error.

Upvotes: 1

Views: 787

Answers (4)

Kokizzu
Kokizzu

Reputation: 26888

Revel for Go could do this, or Beego, the difference is Revel only recompile when there are changes on the source code and on new request (so it's more efficient), Beego recompile every time there are source code changes.

EDIT: Beego 1.3.0 remove its hot reload feature T__T

Upvotes: 0

SerkanSerttop
SerkanSerttop

Reputation: 588

I think what you ask for is actually called live-reload, hot-reload is something I believe only Erlang can truly accomplish.

By configuring and adding plugins to Grunt or Gulp, you can watch for changes in any list / kinds of files and describe any action to be initiated. Here is a plugin for Grunt. With this method, any language can gain such ability.

As a side note, Django (Python) has auto-restart as well. But that does not mean Python language has it built-in, Django uses a Grunt-like trick to restart its dev-server.

Upvotes: 1

Rich Pickering
Rich Pickering

Reputation: 237

You can use Erlang to work as a web server, which is designed to allow you to hot swap whole modules of code while the program is up and running. Though, the functional programming paradigm does take a little while to get used to...

How to write a simple webserver in Erlang?

I hope this helps...

Upvotes: 1

Michael Legart
Michael Legart

Reputation: 820

You can try Perl with the Mojolicious framework: http://mojolicio.us/ (using the morbo server).

Can also be achived with Groovy/Java using the Grails framework: http://grails.org

Upvotes: 1

Related Questions