/demo/README
http://github.com/ThomasLocke/yolk · #! · 117 lines · 79 code · 38 blank · 0 comment · 0 complexity · 6435312b0c54219bc2dbdf355616e4d6 MD5 · raw file
- Welcome to the Yolk demo application!
- Contents of this README:
- 1. Introduction
- 2. Dependencies
- 3. The database demo page
- 4. The email demo page
- 5. Using the Yolk demo application
- 6. Using the Yolk demo as a foundation
- -------------------
- -- Introduction --
- -------------------
- The Yolk demo application serves two purposes:
- 1. It serves as an example on how Yolk can be used in an AWS application.
- 2. It contains examples on how all the various Yolk packages can be used.
- Obviously Yolk comes with complete documentation and a fair amount of source
- code comments, but in some cases it is easier to "get" a system if you see
- some actual working code. The Yolk demo application is such working code.
- Yolk is GPLv3, see ../COPYING3 and ../COPYING.RUNTIME.
- --------------------
- -- Dependencies --
- --------------------
- The Yolk demo application depends on:
- 1. Yolk.
- 2. GNATcoll, compiled with PostgreSQL support.
- If you managed to build and install Yolk, you will most certainly be able to
- build and use the Yolk demo application.
- Of course you should also adjust the configuration/ files to match your own
- setup, but thats not really a dependency is it? :o)
- ------------------------------
- -- The database demo page --
- ------------------------------
- For the database demo page to work, you must set these my_config.ini keys:
- DB_Host
- DB_Name
- DB_Password
- DB_User
- And obviously you must have a DB_Name database setup at the DB_Host with
- credentials matching those given in DB_User and DB_Password.
- You do _not_ need to create any tables in the DB_Name database.
- ---------------------------
- -- The email demo page --
- ---------------------------
- For the email demo page to work, you must set these my_config.ini keys:
- SMTP_Host
- SMTP_Port
- These must point to a reachable and functional SMTP server.
- ---------------------------------------
- -- Using the Yolk demo application --
- ---------------------------------------
- After having build the Yolk demo application (see INSTALL), trying it out is
- a simple matter of:
- Adjust the configuration/ files according to your setup
- $ cd exe/
- $ ./yolk_demo
- Using your browser, visit http://localhost:4242
- You can stop the server cleanly by pressing CTRL+c.
- Instead of starting/stopping the application by calling the yolk_demo executable
- directly, you can use the tools/rc.yolk script. Using this will enable you to
- run a Yolk application like any other server-software. It is properly detached
- from the console. All you have to do is edit a few variables at the beginning of
- the script, so it fits your environment.
- To see the status page for the application, go to
- http://localhost:4242/status
- and enter "admin" as username and "changemenow" as password. See config.ini for
- how to change the password for this page. Look for the Admin_Password option.
- -------------------------------------------
- -- Using the Yolk demo as a foundation --
- -------------------------------------------
- You can absolutely use the Yolk demo application as a foundation for your own
- applications. Just do this:
- 1. You probably want to rename the application from yolk_demo to something
- else. This requires you to:
- A. Rename the main procedure in yolk_demo.adb.
- B. Rename the main yolk_demo.adb file.
- C. Adjust the project file accordingly, renaming the "for Main use" file.
- 2. Adjust the My_Handlers package, and create matching view packages.
- 3. Adjust the My_Configuration package and the my_config.ini file.
- 4. Get rid of all the irrelevant Yolk demo application source code.
- 5. Go!