Skip to the content.

Use !#bash scripts for writing beautiful web apps

pageres

BoS Build Status Gitter Code Climate Awesome k3s

Features

Install Apache2

apt-get update; apt-get install -y apache2
tee /etc/apache2/sites-enabled/000-default.conf >/dev/null <<EOF
<VirtualHost *:80>
	ServerName example.org
	ServerAdmin webmaster@example.org
	DocumentRoot /var/www/html/
 
        ScriptAlias "/index.html" "/usr/lib/cgi-bin/index.cgi"
        ScriptAlias "/index" "/usr/lib/cgi-bin/index.cgi"
        RedirectMatch 404 .*\.htsh
        <Directory /var/www/html/>
          AllowOverride none
          Options -Indexes
          Require all granted
        </Directory>
	ErrorLog /var/log/apache2/error.log
	CustomLog /var/log/apache2/access.log combined
	Include conf-available/serve-cgi-bin.conf
</VirtualHost>
EOF
a2enmod cgid
service apache2 restart

install BoS

git clone https://github.com/tinoschroeter/bash_on_steroids.git /var/www/newProject
cd /var/www/newProject
./bos

Usage

All bash codes are to be enclosed within <?bash ... ?> or in short, <? ... ?> tags.

<!DOCTYPE html>
<html>
 <body>
 <ul>
    <?bash
      for i in Buzz Rex Bo Hamm Slink Potato; do
        echo "<li>$i</li>"
      done
      ?>
</ul>
</body>
</html>

list

Decode URL-encoding

transform this %23%21%2Fbin%2Fbash to that #!/bin/bash
example:

var_dec=$(urldecode $var)

https://en.wikipedia.org/wiki/Percent-encoding

build

$ ./bos.sh 
$ index.htsh --->> /usr/lib/cgi-bin/index.cgi

Vagrant

git clone https://github.com/tinoschroeter/bash_on_steroids.git
cd bash_on_steroids

vagrant up

open http://localhost:8080/

STvsSW

DEMO

Wiki

Wiki –> wiki