Inside a dotCloud run
file.
#!/path/to/swipl -s :- use_module(library(dotcloud)). :- http_handler(/, hello, []). main(_) :- server(www). hello(_Request) :- format('Content-type: text/plain~n~n'), format('Hello Prolog, from dotCloud!~n').
A convenience library for working with SWI-Prolog on dotCloud.
Using SWI-Prolog 6.3 or later:
?- pack_install(dotcloud).
This module uses semantic versioning.
Source code available and pull requests accepted at http://github.com/mndrix/dotcloud
dotcloud.pl | ||
---|---|---|
server/1 | Like server/2 but uses http_dispatch/1 as the Goal. | |
server/2 | Start HTTP service named Service. |