I would like to use Sync on-the-fly recompiling with Cowboy project assembled using relx (as per Cowboy Getting Started Guide).
The problem is that even if I manage to get Sync starting in my application by mentioning sync in applications list in my_application.app.src file like this:
{application, my_application, [
{description, "My Cowboy Application"},
{vsn, "0.1.0"},
{modules, []},
{registered, [my_app_sup]},
{applications, [
kernel,
stdlib,
cowboy,
sync
]},
{mod, {my_app, []}},
{env, []}
]}.`
I still can't get it working because of relx assembler does not move my source code to _rel directory (of course, it shouldn't).
Is there any way to tell Sync where my source files are located? Or may be I'm totally wrong and Sync integration with relx must be done in some other way?
My development setup with sync consists of:
$HOME/lib/erlang
)relx -c relx-dev.config
When developing, I include sync in my development relx.config file. However, once I install sync in a directory and export it to ERL_LIBS, it magically appears when I start the sync app in any of my erlang projects.
Here is an example of my development relx-dev.config file:
Once the relx-dev.config script is created, I build the release with this command:
Here is the
console
script I use to start the console:This script will start an erlang shell with a node name, start all of my apps and the the sync application and load a custom sync config file.
Here is an example
sync.config
file placed in the same directory where you started the shell:The sync README has lots of info about configuring logging behavior for the console and growl. Alternatives to using a
.config
file include passing options to theerl
command and executing sync functions in the shell.