-
Notifications
You must be signed in to change notification settings - Fork 0
1. Starting the Server
This page describes how to startup the ChRIS Web Service.
In order for all the underlying components to run properly you must make sure that your UNIX path is setup to include the "current directory". When the Web Service receives an http transmission, it spawns the ChRIS_SM.py by simply doing a system call to
ChRIS_SM.py ...
If ChRIS_SM.py is not on your PATH, the call will fail.
To check your current PATH value, in a terminal, simply type
echo $PATH
You will see something like
.:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/X11/bin: ...
where the colon character : is a field separator. For the current directory to be in your path, look for an entry that consists of simply a single dot . - in the above you can see it happens to be the first field. It doesn't really matter where in the string the current directory . is - what matters is that it is there.
If you don't have the current directory in the PATH, then you need to add it. Please google "how to add current directory to path in Linux" for some resources. Here is [one] (http://superuser.com/questions/350844/how-to-permanently-add-current-directory-to-path-in-linux).
To start the service, in the directory containing the checked out repository, simply do
ChRIS_WS.py -i 192.168.1.3 -p 5555 --API REST
where the -i 192.168.1.3 is the IP address of the host you are on and -t 5555 denotes the port for the service to listen on. Specifying the IP of the host is important if you want non-localhost clients to also be able to connect.
The --API REST tells the Web Service to expect REST type calls.