[newbie] auto reload on windows?

21 views
Skip to first unread message

sfinnie

unread,
May 11, 2015, 10:42:44 AM5/11/15
to nitro...@googlegroups.com
Hi all,

Trying my first nitrogen app on windows 7.  Have the "Hello World" app running OK, but when I change index.erl & reload in the browser, the changes don't show without killing the erlang console and restarting.  No doubt something simple but would appreciate any suggestions.  What I've done so far:

1. Downloaded latest pre-packaged win build (webmachine variant) & unzipped.
2. Open cmd prompt & run `start.cmd console`.  Erlang console opens & I can load site in the browser.
3. type `sync:go() <enter> in the erlang console
4. Edit `site/src/index.erl`, change "Welcome to Nitrogen" text in header tag to something else.
5. Nothing happens at this point - no messages in console / cmd window; refreshing browser shows no update.
6. Type `sync:go().` into erlang console (i.e. added period at end).  Console now says:

      Starting Sync (Automatic Code Compiler / Reloader)
      Scanning source files...
      ok

7. Refresh browser; still no change.
8. Kill erlang console (Ctrl-g q).
9. restart console: `start.cmd console`.  Refresh browser, changes shown.

Thanks,
Scott.

PS: apologies if this answered elsewhere, didn't find it googling around.

Bernie

unread,
May 11, 2015, 7:20:42 PM5/11/15
to nitro...@googlegroups.com
Hi Scott,

sorry if this is too obvious, but did you save again after step 6? Sync will only pick up changes after it started so your edit/safe in step 4 won't show.

sfinnie

unread,
May 12, 2015, 3:14:51 AM5/12/15
to nitro...@googlegroups.com
Hi Bernie, 

Did save thanks (and not too obvious, been caught with that kind of thing before..!).

I tried separately on my linux box and everything worked fine.  Only difference was calling 'bin/nitrogen console' instead of using start.cmd.  There was a notification in the console as soon as I saved the updated index.erl.  Just tried again on windows and there's no console notification; so for some reason it's not detecting the change.

I can work around it; just wondered if I was missing something obvious.

Thanks,
Scott.
Reply all
Reply to author
Forward
0 new messages