These are chat archives for synrc/n2o

Oct 2017
Zelphir Kaltstahl
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."


How do I "plug" anything?

Zelphir Kaltstahl
Oct 21 2017 21:21
Namdak Tonpa
Oct 21 2017 21:51
Zelphir Kaltstahl
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://",{tag,"2.9"}})
    ===> Failed to fetch and copy dep: {git,"git://",{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
Oct 21 2017 22:11
I should just ignore the versions in the book (they are older than the ones in the sample)? 2.9 2.9 2.9 2.9 1.5 1.5 1.5 1.5
Namdak Tonpa
Oct 21 2017 22:16
we don't support rebar3
we use mad
or just rebar
Zelphir Kaltstahl
Oct 21 2017 22:17
What would the mad command look like, to load all the stuff I added to rebar.config?
Namdak Tonpa
Oct 21 2017 22:17
mad dep
Zelphir Kaltstahl
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
Oct 21 2017 22:35
yes better formad is to be system-wide like rebar in PATH
Zelphir Kaltstahl
Oct 21 2017 23:12
I am trying to get a minimal "hello world" kind of n2o app running.
The instructions on this page: 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,
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"