2

I am creating a web app in Erlang with n2o. My current dilemma is the automatic syncing of changes i make to the app's source code to that with the accommodating release.

For example, I startup my app release in the erlang console, go to specific localhost:? address and see index.erl being reflected in the page with <span>Hello</span> shown. I then go back to modify the index.erl file to say Hello World instead. The changes are not reflected. So i end up regenerating a release to see the new changes.

I guess I could write a bash script to synchronize changes between the app source files and the release libraries, but I imagine there must be better ways of doing this.

What is the appropriate way of doing this?

Alejandro Alcalde
  • 5,990
  • 6
  • 39
  • 79
mamusr
  • 33
  • 6

2 Answers2

3

The synchronization capability you're looking for is explained in the n2o README.

Steve Vinoski
  • 19,847
  • 3
  • 31
  • 46
  • Thanks Steve. You are correct. 5HT helped me understand how synrc/active (https://github.com/synrc/active) helps with this issue during development. – mamusr Jun 09 '14 at 15:45
1

Clone the git-repo 5HT/n2o and follow the instructions in the samples section of that repository. Make a change to one of the source files and once they are saved, you can see the updated changes in the erlang shell as well the web site itself.

mamusr
  • 33
  • 6