Zero dependency guestbook webapp built on nodejs
git clone https://www.aktsbot.in/git-web/gb/gb.git
gb - guestbook
==================================
gb is a zero-dependency single-file guestbook webapp built with nodejs.
What is a guestbook?
--------------------
A live-page where visitors of your website can leave messages for you or
for the world!
See a running instance at https://aktsbot.in/gb
Dependencies
------------
the node binary to be in your $PATH
Installation
------------
Clone the repo or copy the gb.js file somewhere. For example, /var/www/gb
$ cd /var/www/gb
$ touch data.txt
$ node gb.js
It is important to create a blank data.txt file, before running the script.
Possible configuration is done via environment variables
$ GB_PORT=9080 \
GB_BASE_PATH="/gb" \
GB_DEBUG=false \
node gb.js
Here's a sample nginx.conf for deploying this service
---------------------8<----------------------------------
server {
listen 80;
root /var/www/mysite.com;
index index.html index.htm;
server_name www.mysite.in;
# this location block is what you need
location /gb {
proxy_pass http://localhost:9080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
---------------------8<----------------------------------
Thanks
------
https://baccyflap.com/gb/