2021-12-04 04:58:43 +00:00
|
|
|
# guestbook-ng
|
|
|
|
|
2021-12-04 05:11:37 +00:00
|
|
|
The goal of guestbook-ng is to integrate across vendors and customers
|
|
|
|
with full-service analytics insights by leveraging the latest in Perl
|
|
|
|
Mojolicious blockchain technologies powered by AI.
|
|
|
|
|
2021-12-04 23:36:10 +00:00
|
|
|
## DB Config
|
|
|
|
|
|
|
|
$ cat guestbook-ng.conf
|
|
|
|
{
|
2021-12-12 06:50:07 +00:00
|
|
|
secrets => ['a_secret_here'],
|
|
|
|
'TagHelpers-Pagination' => {
|
|
|
|
separator => ' ',
|
|
|
|
current => '<strong>{current}</strong>'
|
|
|
|
},
|
|
|
|
dev_env => {
|
2021-12-11 23:48:00 +00:00
|
|
|
pg_user => 'guestbooker',
|
|
|
|
pg_pw => 'a_password_here',
|
|
|
|
pg_db => 'guestbook',
|
|
|
|
pg_host => 'localhost'
|
|
|
|
},
|
|
|
|
prod_env => {
|
|
|
|
pg_user => 'guestbooker',
|
|
|
|
pg_pw => 'prod_password_here',
|
|
|
|
pg_db => 'guestbook',
|
|
|
|
pg_host => 'prod.db.com'
|
|
|
|
|
2021-12-12 06:50:07 +00:00
|
|
|
},
|
|
|
|
max_posts => 5
|
2021-12-04 23:36:10 +00:00
|
|
|
}
|
|
|
|
|
2021-12-12 06:50:07 +00:00
|
|
|
`secrets` and the DB credentials are mandatory
|
|
|
|
|
2021-12-04 23:36:10 +00:00
|
|
|
## Testing
|
|
|
|
|
2021-12-12 06:50:07 +00:00
|
|
|
$ prove -l
|
2021-12-04 23:36:10 +00:00
|
|
|
t/basic.t .. ok
|
|
|
|
All tests successful.
|
|
|
|
Files=1, Tests=6, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.58 cusr 0.05 csys = 0.67 CPU)
|
|
|
|
Result: PASS
|
|
|
|
|
|
|
|
Add the `-v` option for more verbose output
|
2021-12-19 22:56:45 +00:00
|
|
|
|
2021-12-31 01:52:34 +00:00
|
|
|
## Docker
|
|
|
|
|
|
|
|
### Build
|
|
|
|
|
|
|
|
docker build -t guestbook-ng .
|
|
|
|
|
2021-12-19 22:56:45 +00:00
|
|
|
## TODOs
|
|
|
|
|
2022-01-10 16:59:34 +00:00
|
|
|
1. Make the Postgres connection string more configurable (need to use
|
|
|
|
UNIX sockets in Prod...)
|
2022-01-08 03:46:04 +00:00
|
|
|
1. /spam route would be interesting
|
2022-01-08 03:51:12 +00:00
|
|
|
1. Include the total number of visitors or messages
|