config-pg.yaml 730 B

123456789101112131415161718192021222324252627282930313233343536
  1. env:
  2. pg.connection:
  3. user: PGUSER
  4. password: PGPASS
  5. web:
  6. resources:
  7. /db:
  8. get: pg.single_database_query
  9. /queries:
  10. get: pg.multiple_database_queries
  11. /fortunes:
  12. get: pg.fortunes
  13. /updates:
  14. get: pg.database_updates
  15. pg:
  16. cls: pg.PG
  17. connection:
  18. dsn: postgresql://tfb-database:5432/hello_world
  19. username: benchmarkdbuser
  20. password: benchmarkdbpass
  21. templates:
  22. cls: pg.Templates
  23. fortune: |
  24. <!DOCTYPE html>
  25. <html>
  26. <head><title>Fortunes</title></head>
  27. <body>
  28. <table>
  29. <tr><th>id</th><th>message</th></tr>
  30. {% for fortune in fortunes %}<tr><td>{{ fortune[0] }}</td><td>{{ fortune[1]|e }}</td></tr>
  31. {% endfor %}</table>
  32. </body>
  33. </html>