Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

A web framework written in bash. Please don't use this for anything. Work in progress...

Notifications You must be signed in to change notification settings

travcunn/lol-bash-web-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lol-bash-web-framework

A web framework written in bash.

"Look at mah new framework, it does all the things!" yolo

source: nodejs reactions

###Requirementz Make sure netcat is installed.

###Start the internetz: ./server.sh

Visit: http://127.0.0.1:5000/home

####views.sh:

function homeView()
{
    local view=$(cat views/index.html)
    echo "$view"
}

function loginView()
{
    local view=$(cat views/login.html)
    echo "$view"
}

: '
# Implement a custom 404 view.
function 404View()
{
    echo "<h1>404 Not Found</h1>"
}
'

####urls.sh:

# URLs for routing to views
URLS=( ["/home"]=homeView )

####Host configuration: The default port is 5000, but can be changed in config.sh by editing the "PORT" variable:

PORT=5000

Work in progress... Ideas: custom status codes in the views, regex URL routing, templating (using awk + sed)....

######Warning: Don't actually use this for anything.

About

A web framework written in bash. Please don't use this for anything. Work in progress...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published