All Projects → tinoschroeter → bash_on_steroids

tinoschroeter / bash_on_steroids

Licence: other
Use bash scrpts for writing beautiful web apps. 🌐

Programming Languages

CSS
56736 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to bash on steroids

nodejs-hackathon-boilerplate-starter-kit
Just a Hackaton/Startup Full-stack node.js starter
Stars: ✭ 37 (-17.78%)
Mutual labels:  rapid-prototyping, rapid-development
ventilator-FI5
FI5: Rapidly Manufactured Ventilator System
Stars: ✭ 31 (-31.11%)
Mutual labels:  rapid-prototyping, rapid-development
unity-ui-manager
🎫 A Simple UI Manager for rapid prototyping and ease of collaboration
Stars: ✭ 44 (-2.22%)
Mutual labels:  rapid-prototyping, rapid-development
bitcoin-cryptocurrency-tutorial
PHP & Cryptocurrencies Collections. Powered By https://btcschools.net
Stars: ✭ 142 (+215.56%)
Mutual labels:  rapid-development
bce-client
百度云-客户端
Stars: ✭ 24 (-46.67%)
Mutual labels:  bos
openradtool
application source generator
Stars: ✭ 34 (-24.44%)
Mutual labels:  rapid-development
crud-json-api
Build advanced JSON API Servers with almost no code.
Stars: ✭ 47 (+4.44%)
Mutual labels:  rapid-development
sage-xpress
A collection of Roots/Sage 9.x-beta providers for rapid theme development. Xpress adds configurable app-like functionality to the Sage Container.
Stars: ✭ 26 (-42.22%)
Mutual labels:  rapid-development
glfw-skeleton
💀 A skeleton OpenGL C++ app bootstrapped with glfw, glad, and glm.
Stars: ✭ 24 (-46.67%)
Mutual labels:  rapid-development
vaahcms
VaahCMS is a laravel based open-source web application development platform shipped with a headless content management system (CMS).
Stars: ✭ 56 (+24.44%)
Mutual labels:  rapid-development
backend
Python backend exposing an API to control, configure and program CoderBot.
Stars: ✭ 35 (-22.22%)
Mutual labels:  rapid-development
upp-components
A collection of packages for U++ framework.
Stars: ✭ 36 (-20%)
Mutual labels:  rapid-development
firebase-spring-boot-rest-api-authentication
Firebase Spring Boot Rest API Authentication
Stars: ✭ 172 (+282.22%)
Mutual labels:  rapid-prototyping
nubuilder4
This repository is no longer maintained!
Stars: ✭ 22 (-51.11%)
Mutual labels:  rapid-development
popsicle
Popsicle aims to bridge the JUCE c++ framework to python.
Stars: ✭ 102 (+126.67%)
Mutual labels:  rapid-development
XinFramework
Android 快速开发框架 总结以往开发结合三方项目 不断更新
Stars: ✭ 21 (-53.33%)
Mutual labels:  rapid-development
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+18684.44%)
Mutual labels:  rapid-development
reboost
A super fast dev server for rapid web development
Stars: ✭ 59 (+31.11%)
Mutual labels:  rapid-development
DA-His
一套完整的HIS,基于Delphi RemObjects DataAbstract开发,以Schema为中心
Stars: ✭ 28 (-37.78%)
Mutual labels:  rapid-development

Use !#bash scripts for writing beautiful web apps

pageres

DEMO bos.tino.sh

BoS MIT Build Status Gitter GitHub issues Awesome k3s GitHub Super-Linter last-commit

Features

  • easy to use <?bash echo "hello world" ?>
  • write fast wabapps in pure #!bash script
  • QUERY_STRING and POST_STRING variables can used as normal bash variables (e.g example?var1=foo&var2=bar&var3=nase becomes to echo "${var1} ${var2} ${var3})
  • Funktion for decoding URL-encoding: var_dec=$(urldecode $var1)
  • Bash for Web Applications

Why?

  • Because there's nothing you can't fix with a #!Bash Script.

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 [email protected]
	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

cd /var/www/html # your html folder
wget https://raw.githubusercontent.com/tinoschroeter/bash_on_steroids/master/build.sh
wget https://raw.githubusercontent.com/tinoschroeter/bash_on_steroids/master/index.htsh # example file
chmod +x build.sh
./build.sh

$ index.cgi can be found in  /usr/lib/cgi-bin

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>

The Template Enginge will create this cgi script out of it

#!/bin/bash 
echo "X-Bash-On-Steroids: Because there's nothing you can't fix with a #!Bash Script."
echo Content-type: text/html
echo ""
## make POST and GET stings 
## as bash variables available
if [ ! -z $CONTENT_LENGTH ] && [ "$CONTENT_LENGTH" -gt 0 ] && [ $CONTENT_TYPE != "multipart/form-data" ]; then
read -n $CONTENT_LENGTH POST_STRING <&0
eval $(echo "${POST_STRING//;}"|grep '='|tr '&' ';')
fi
eval $(echo "${QUERY_STRING//;}"|grep '='|tr '&' ';')
## decode URL-encoding
urldecode() { : "${*//+/ }"; echo -e "${_//%/\x}"; }
echo  "<!DOCTYPE html>"
echo  "<html>"
echo  " <body>"
echo  " <ul>"
    
      for i in Buzz Rex Bo Hamm Slink Potato; do
        echo "<li>$i</li>"
      done
      
echo  "</ul>"
echo  "</body>"
echo  "</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

$ ./build.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:8090/

STvsSW

DEMO

Wiki

Wiki --> wiki

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].