PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/demo/README

http://github.com/ThomasLocke/yolk
#! | 117 lines | 79 code | 38 blank | 0 comment | 0 complexity | 6435312b0c54219bc2dbdf355616e4d6 MD5 | raw file
  1Welcome to the Yolk demo application!
  2
  3Contents of this README:
  4
  5    1. Introduction
  6    2. Dependencies
  7    3. The database demo page
  8    4. The email demo page
  9    5. Using the Yolk demo application
 10    6. Using the Yolk demo as a foundation
 11
 12-------------------
 13--  Introduction --
 14-------------------
 15
 16The Yolk demo application serves two purposes:
 17
 18    1. It serves as an example on how Yolk can be used in an AWS application.
 19    2. It contains examples on how all the various Yolk packages can be used.
 20
 21Obviously Yolk comes with complete documentation and a fair amount of source
 22code comments, but in some cases it is easier to "get" a system if you see
 23some actual working code. The Yolk demo application is such working code.
 24
 25Yolk is GPLv3, see ../COPYING3 and ../COPYING.RUNTIME.
 26
 27--------------------
 28--  Dependencies  --
 29--------------------
 30
 31The Yolk demo application depends on:
 32
 33    1. Yolk.
 34    2. GNATcoll, compiled with PostgreSQL support.
 35
 36If you managed to build and install Yolk, you will most certainly be able to
 37build and use the Yolk demo application.
 38
 39Of course you should also adjust the configuration/ files to match your own
 40setup, but thats not really a dependency is it?  :o)
 41
 42------------------------------
 43--  The database demo page  --
 44------------------------------
 45
 46For the database demo page to work, you must set these my_config.ini keys:
 47
 48    DB_Host
 49    DB_Name
 50    DB_Password
 51    DB_User
 52
 53And obviously you must have a DB_Name database setup at the DB_Host with
 54credentials matching those given in DB_User and DB_Password.
 55
 56You do _not_ need to create any tables in the DB_Name database.
 57
 58---------------------------
 59--  The email demo page  --
 60---------------------------
 61
 62For the email demo page to work, you must set these my_config.ini keys:
 63
 64    SMTP_Host
 65    SMTP_Port
 66
 67These must point to a reachable and functional SMTP server.
 68
 69---------------------------------------
 70--  Using the Yolk demo application  --
 71---------------------------------------
 72
 73After having build the Yolk demo application (see INSTALL), trying it out is
 74a simple matter of:
 75
 76    Adjust the configuration/ files according to your setup
 77    $ cd exe/
 78    $ ./yolk_demo
 79    Using your browser, visit http://localhost:4242
 80
 81You can stop the server cleanly by pressing CTRL+c.
 82
 83Instead of starting/stopping the application by calling the yolk_demo executable
 84directly, you can use the tools/rc.yolk script. Using this will enable you to
 85run a Yolk application like any other server-software. It is properly detached
 86from the console. All you have to do is edit a few variables at the beginning of
 87the script, so it fits your environment.
 88
 89To see the status page for the application, go to
 90
 91    http://localhost:4242/status
 92
 93and enter "admin" as username and "changemenow" as password. See config.ini for
 94how to change the password for this page. Look for the Admin_Password option.
 95
 96-------------------------------------------
 97--  Using the Yolk demo as a foundation  --
 98-------------------------------------------
 99
100You can absolutely use the Yolk demo application as a foundation for your own
101applications. Just do this:
102
103    1. You probably want to rename the application from yolk_demo to something
104       else. This requires you to:
105
106         A.  Rename the main procedure in yolk_demo.adb.
107         B.  Rename the main yolk_demo.adb file.
108         C.  Adjust the project file accordingly, renaming the "for Main use" file.
109
110    2. Adjust the My_Handlers package, and create matching view packages.
111
112    3. Adjust the My_Configuration package and the my_config.ini file.
113
114    4. Get rid of all the irrelevant Yolk demo application source code.
115
116    5. Go!
117