Commit d997fbaf authored by Aral Balkan's avatar Aral Balkan

Add blog post announcing Site.js version 12.9.7

parent 4aff8e28
title: "Site.js: now with auto server reload on source code changes"
date: 2019-10-30T19:21:35Z
description: When you change the source code for a dynamic route, your Site.js server automatically reloads.
- ""
videos: [""]
- site.js
- auto reload
- dynamic site
- javascript
- js
- node.js
draft: false
<video controls poster=''>
<source src='' type='video/mp4'>
<source src='' type='video/mp4'>
<p>Sorry, your browser doesn't support embedded videos. But that doesn’t mean you can’t watch it! You can <a href=''>download this video directly</a>, and watch it with your favourite video player.</p>
<figcaption>A quick demonstration of the new auto-reload feature.</figcaption>
## Auto reload
[Site.js]( version 12.9.7 brings the second developer experience improvement to Site.js in as many days with an integrated auto reload feature that responds to source code changes on dynamic sites.
### Live reload yesterday, auto reload today
Following yesterday’s addition of [live reload for static sites](/2019/10/29/site.js-now-with-live-reload/), today you get auto server reloads when the source code of your [dynamic site]( changes.
This is the sort of functionality you’d normally implement by using excellent third-party tools like Remy’s [nodemon]( With Site.js, you now get it out of the box. No external process manager required.
So now, if you change the code in a [DotJS route]( or even if you add or remove a new node module, the server will automatically restart.
Note that during development, it’s the server that restarts, not your whole process. That’s faster than a full reload of the whole Site.js process.
### Seamless restarts on deployment when necessary
While the auto reload feature is a great help during development, it also makes your life much easier during deployment.
If you [run Site.js in production]( using [the `enable` command](, your server will now automatically restart when you [sync your changes to it]( (And do so only if it needs to.)
None of this changes the behaviour of static page and asset updates which have always been, and continue to be, immediately available on deployment without requiring a server restart.
### Have a play!
{{<figure src="../../18/site.js-and-pi/site-js-chat-on-raspberry-pi-1.jpeg" alt="Screenshot of the Site.js basic chat example running on a Raspberry Pi 4B." caption="Yes, I’m going to keep mentioning the tutorial until you try it!">}}
If you’re wondering what Site.js is, check out [the Site.js web site](https// and have a glance at [the Site.js documentation](
There’s also a tutorial I released a few weeks ago that takes you through building static and dynamic sites with Site.js as you [build a simple chat app using WebSockets](
I these improvements make your experience of creating with Site.js more delightful.
{{< like_this_fund_us >}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment