1gb - guestbook
2==================================
3gb is a zero-dependency single-file guestbook webapp built with nodejs.
4
5What is a guestbook?
6--------------------
7A live-page where visitors of your website can leave messages for you or
8for the world!
9
10See a running instance at https://aktsbot.in/gb
11
12Dependencies
13------------
14the node binary to be in your $PATH
15
16Installation
17------------
18
19Clone the repo or copy the gb.js file somewhere. For example, /var/www/gb
20
21$ cd /var/www/gb
22$ touch data.txt
23$ node gb.js
24
25It is important to create a blank data.txt file, before running the script.
26Possible configuration is done via environment variables
27
28$ GB_PORT=9080 \
29 GB_BASE_PATH="/gb" \
30 GB_DEBUG=false \
31 node gb.js
32
33Here's a sample nginx.conf for deploying this service
34
35---------------------8<----------------------------------
36
37server {
38 listen 80;
39
40 root /var/www/mysite.com;
41 index index.html index.htm;
42
43 server_name www.mysite.in;
44
45 # this location block is what you need
46 location /gb {
47 proxy_pass http://localhost:9080;
48 proxy_http_version 1.1;
49 proxy_set_header Upgrade $http_upgrade;
50 proxy_set_header Connection 'upgrade';
51 proxy_set_header Host $host;
52 proxy_cache_bypass $http_upgrade;
53 }
54
55}
56
57---------------------8<----------------------------------
58
59Thanks
60------
61https://baccyflap.com/gb/
62