-
Notifications
You must be signed in to change notification settings - Fork 1
1 Using Yapps
Using yapps!
Ok… I picked up a calendar I’ve done while trying out erlyweb and tried to yapp-it.
I copied part of the yapp application, using the same folder structure (http://www.erlang.org/doc/design_principles/applications.html#7)
and changing the Makefiles to match my project.
Using the web interface (http://localhost:8001/yapp/) I added my new yapp called webcalendar.
I choose the ido server, set the name and provided the path (/webcalendar), which resulted in an error over at the console:
=INFO REPORT== 5-Dec-2008::00:14:08 =
Starting app webcalendar1>
=ERROR REPORT== 5-Dec-2008::00:14:08 =
yapp:insert_yapp_in_sconf – Error loading Yapp webcalendar, {error,
{"no such file or directory",
“webcalendar.app”}}1>
After looking around for a bit I realized this was the culprit:
1> application:start(webcalendar).
{error, {"no such file or directory", “webcalendar.app”}}
Adding a new ebin_dir line to my yapp.conf solved that problem:
ebin_dir = ebin # the yapp application ebin folder
ebin_dir = C:/yaws/apps/webcalendar/ebin # my webcalendar application ebin folder
Fuck! This messes everything up. If I have to include the ebin folder manually it means “yapps” don’t do any load/reload magic while serving requests.
Back to square one. Erlang offers no out-of-the-box sandboxing abilities!
Still, what are the benefits of using yapps? The OTP Framework!
Each YAPP follows the OTP design principles and we can take advantage of that to ensure that a service is always up and running!