Make it easier to embed Nitrogen in some other Erlang application
-
Rusty Klophaus
- Milestone set to 2.0.2
-
imshahz (at gmail)
Hi Rusty !
Currently I am trying to integrate my nitrogen project with another application and have no idea how to modify my nitrogen project settings. When you are planning to work on this task?
any idea...Regards,
Shahzad Gul
Master student
Uppsala university -
Rusty Klophaus
Hi Shahzad,
Hope all is well. Sorry for the delayed response, it's been a busy few weeks.
With Nitrogen 2.0.2, some new code was added to nitrogen.erl to make it easier to embed Nitrogen in another application. You should be able to pull in the required projects (nitrogen, simple_bridge, nprocreg), and then call:
nitrogen:start_link(CallbackModule).
CallbackModule should expose:
http_server() -> Return either 'inets', 'yaws', or 'mochiweb'.
serverport() -> Return integer port.
serverip() -> Return an ip. Format depends on your http server.
docroot() -> "./location/to/static/content".
handlers() -> ok. Use this to specify custom handlers.
Hope that helps!
Best,
Rusty -
imshahz (at gmail)
Hi Rusty !
Thanks for help, it works pretty smooth now. One more question, I wonder how can I use google linechartXY in nitrogen , i think nitrogen supports only linechart..
Regards,
Shahzad Gul -
imshahz (at gmail)
Hi Rusty !
I don't know the exact way to do this in nitrogen but I am able to use linechartXY and some other google charts by using erlydtl templates.
Regards,
Shahzad Gul -
Andrew TJ
Hi Rusty,
Have you made any decision as to whether you will split up the various Nitrogen apps into separate repos?
— Andrew
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.