Configuration
Author(s): Christian Giménez.This is the configuration module in datalog format. Is a Knowledge Base about what PillowCase need to know for starting up the server.
What to do?
Usually nothing, with the default configuration you will have:- Port 8080
- Home directory as /var/www/html
If you want to change it, you must edit this the file.
In the web browser, the URL for accessing the HTTP server is: http://localhost:8080..
How to edit
Just take a look at the predicates, and change the number or strings.There must be only one predicate for each configuration.
To be sure that it works, you can load this library into Ciao interpreter using C-c l in Emacs or the ciaosh application and ask to prolog the predicates.
For example of a prolog query and answer in ciaosh.
?- use_module('/home/cng/Documentos/proyectos/PillowCase/PillowCase/src/pc_config.pl'). yes ?- port(X). X = 8080 ? ; no ?- home_dir(X), display_string(X). /var/www/html X = [47,118,97,114,47,119,119,119,47,104,116,109,108] ? ; no
Usage and interface
- Library usage:
:- use_module(library(pc_config)). - Exports:
- Predicates:
port/1, home_dir/1, page_404/1.
- Predicates:
- Other modules used:
- Internal (engine) modules:
term_basic, arithmetic, atomic_basic, attributes, basic_props, basiccontrol, data_facts, exceptions, io_aux, io_basic, prolog_flags, streams_basic, system_info, term_compare, term_typing, hiord_rt, debugger_support.
- Internal (engine) modules:
Documentation on exports
PREDICATE
Usage: home_dir(Str)
- Description: Is t if unifies with the home directory where PillowCase have to find the HTML/Pillow files the client/web browser can see.