/demo/README

http://github.com/ThomasLocke/yolk · #! · 117 lines · 79 code · 38 blank · 0 comment · 0 complexity · 6435312b0c54219bc2dbdf355616e4d6 MD5 · raw file

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