= Web interface = The web based interface has many benefits and implements additional functionality. The main features of the web interface: * are the ability to run semantic queries- both of global queries and queries starting with @ are supported, * the query construct assistant, * the query storage and the visualisation of the query result, * possibility to see running queries and abort them if necessary, * database operations, * ability to mark files with error forms, * dependency examinations. !JavaScript must be enabled in the browser to be able to use the interface! == Installation == To be able to use the web based interface we need to have an already working Yaws webserver. Required version is 1.89. Help for the installation: http://yaws.hyber.org/yaws.pdf (Chapter 2). == Start up == We can start the interface either with {{{referl}}} script with {{{-nitrogen}}} switch, or from RefactorErl shell. In both cases we get a default configuration with server name {{{localhost}}}, port {{{8001}}}, and IP {{{127.0.0.1.}}} === Starting up with referl script === Parameters to be configured: * {{{-yaws path YPATH:}}} The absolute location of your Yaws ebin directory. * {{{-yaws listen YLISTEN:}}} Valid IP address, which Yaws will listen to. * {{{-yaws name YNAME:}}} Valid domain name, which Yaws will be bound to. * {{{-yaws port YPORT:}}} Valid port number, which Yaws will be bound to. * {{{-browser root BROOT:}}} The web based interface allows database operations. The root directory for those operations can be set, by giving the path of root directory in this parameter. * {{{-images dir IDIR:}}} Path of the directory where the generated images, which are the visualisation of the results of dependency examinations, will be written. Usage of switches is optional, except the {{{-nitrogen}}} switch. Example: {{{ bin/referl -nitrogen -yaws_path /Users/V/yaws-1.89/ebin -yaws_listen 127.0.0.1 -yaws_port 8000 -yaws_name localhost -browser_root /Users/V/erlang -images_dir /Users/V/graph_images }}} === Starting up from !RefactorErl shell === We have 2 functions for starting the interface : {{{ri:start nitrogen/0}}} and {{{ri:start nitrogen/1}}}. If the 0 arity function is used, the interface starts up with default configuration. If the 1 arity function is used the start up can be configured using a prop-list. Available properties are the same as described in the previous section. Usage of switches is optional. Example: {{{ ri:start_nitrogen([ {yaws_path,"/Users/V/yaws-1.89/ebin"}, {yaws_listen,"127.0.0.1"}, {yaws_name, localhost}, {yaws_port,"8000"}, {browser_root,"/Users/V/erlang"}, {images_dir,"/Users/V/graph_images"}]). }}} == Shutting down == It is important to log out, before shutting down the interface, because the log out process will delete the dynamic generated images, which belong to the user. If the interface have been started up from !RefactorErl shell, then {{{ri:stop nitrogen().}}} can be called to shut down the interface.