Second step: Prepare the meal
The environment that you are going to use is a web service called PyF.Services.
In order to run it, you have to set up a database and choose a port for it.
The first step is to go in the environment you created earlier and activate it if it's not already done (if you are comming from the installation step, skip this one), under linux :
$ cd pyfenv
$ source bin/activate
Under windows :
$ cd pyfenv
Next, download a configuration script for your environment (under windows, just download this file to the folder):
$ wget http://www.pyfproject.org/files/pyfservices.ini
Edit it as needed, here are a few tips :
- The line under [server:main] with "port = 8080" will define the port the server will run on, 8080 is a good default, unledd you have another service running on that port already
- The line under [app:main] with "sqlalchemy.url =" defines the database to use.
The default one is a sqlite database. A good practice is to replace that with postgresql.
To do that, just comment this line, and find the line that starts with "#sqlalchemy.url=postgres://", uncomment it and change it to define your database user, password, hostname, port and name.
Once this step is done, run this command to create the tables and insert sample data :
$ pyfservices-setup pyfservices.ini
Finally, to run your instance, just type :
$ paster serve pyfservices.ini
Now, just go to http://127.0.0.1:8080/ with your browser (change the port if you defined another one).
The default logins are :
- User name : manager
- Password : managepass
Go to user management tab as soon as possible and change this login.
After you started it
See the pyf services overview to understand what are the different tabs.