bashd
1.0.0

Clon el proyecto
git clone https://github.com/AlexGustafsson/bashd
Navegue a la carpeta
cd bashd
Iniciar el servidor
./bashd
Inicio rápido
Características
Uso
Que contribuye
Preguntas frecuentes
Definición de una ruta
route get / homePage
# Special 404 route - handles all 404s
route get 404 notFoundPage
# POST a message to the echo page to hear it back louder!
route post /echo echoPageManejo de páginas
function homePage {
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
EOF
}
function notFoundPage {
setResponseCode " 404 "
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1>Cannot find $HTTP_METHOD $HTTP_PATH </h1>
</body>
</html>
EOF
}
function echoPage {
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1> ${HTTP_BODY_MESSAGE^^} </h1>
</body>
</html>
EOF
}P : ¿Funciona? A : Sí.
P : ¿Es seguro? A : No.
P : ¿Es una broma? A : Principalmente.
Cualquier ayuda con el proyecto es más que bienvenida. En caso de duda, publique un problema.