These are chat archives for synrc/n2o

21st
Oct 2017
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 21:13

I have a question about setting up n2o:

What does:

"For raw N2O use with BERT message formatter you need only one N2O dependecy, but if you want to use DTL templates, JSON message formatter, SHEN JavaScript Compiler or NITRO Nitrogen DSL you can plug all of them separately."

mean?

How do I "plug" anything?

Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 21:21
Namdak Tonpa
@5HT
Oct 21 2017 21:51
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 22:03
Oh that's what I've tried, but it could not find those things. I changed to the versions mentioned in the n2o book, but then it told me:
    rebar3 compile
    ===> Verifying dependencies...
    ===> Fetching nitro ({git,"git://github.com/synrc/nitro",{tag,"2.9"}})
    ===> Failed to fetch and copy dep: {git,"git://github.com/synrc/nitro",{tag,"2.9"}}
I also tried changing the versions to 2.8, but it did not help and I only could comment out all the rows in the rebar3 config file to make it at least pull the stuff where no failure to fetch appeared. Here is my rebar3 config with commented out stuff:
ah damn I already deleted the file
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 22:11
I should just ignore the versions in the book (they are older than the ones in the sample)?
https://github.com/synrc/n2o 2.9
https://github.com/synrc/nitro 2.9
https://github.com/synrc/kvs 2.9
https://github.com/synrc/active 2.9
https://github.com/synrc/shen 1.5
https://github.com/synrc/rest 1.5
https://github.com/spawnproc/bpe 1.5
https://github.com/spawnproc/forms 1.5
Namdak Tonpa
@5HT
Oct 21 2017 22:16
we don't support rebar3
we use mad
or just rebar
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 22:17
What would the mad command look like, to load all the stuff I added to rebar.config?
Namdak Tonpa
@5HT
Oct 21 2017 22:17
mad dep
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 22:19
Ok, so I need to make that system wide known, right? (Like I did with rebar. I compiled it from source and then extended my PATH variable, so that I could use it in any directory to create an app structure.)
Or should I put my application into the n2o samples directory?
Namdak Tonpa
@5HT
Oct 21 2017 22:35
yes better formad is to be system-wide like rebar in PATH
Zelphir Kaltstahl
@ZelphirKaltstahl
Oct 21 2017 23:12
I am trying to get a minimal "hello world" kind of n2o app running.
The instructions on this page: http://synrc.com/apps/mad/doc/web/setup.htm#sec6 don't seem to work for me. It seems it must be escript sample instead of escript web_app and when it runs localhost:8000 is not reachable.
It also does not drop me into a shell as seen in the example output of the command, but rather stops at:
Configuration: [{n2o,[{port,8001},{route,routes},{log_modules,sample}]}]
Applications: [kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,inets,
               gproc,cowlib,cowboy,n2o,sample,active,erlydtl,jsone,mad,nitro,
               sh]
Setting up watches.  Beware: since -r was given, this may take a while!
Watches established.
==> "sample"
==> "/home/user/development/Erlang/N2O/sample"
==> "erlydtl"
==> "cowboy"
==> "cowlib"
==> "ranch"
==> "gproc"
==> "fs"
==> "sh"
==> "mad"
==> "active"
==> "nitro"
==> "n2o"
==> "jsone"
==> "/home/user/development/Erlang/N2O/sample/apps"
==> "/home/user/development/Erlang/N2O/sample/apps/sample"