Skip to content
/ HTTB Public
forked from Krowemoh/bash-server

The HTTP server purely written in Bash! "HTTB" stands for Hyper Text Transfer Bash. Imagine nginx, but written in shell.

Notifications You must be signed in to change notification settings

Plasmmer/HTTB

 
 

Repository files navigation

HTTB

The HTTP server purely written in Bash!

Imagine nginx, but written in shell.

"HTTB" stands for Hyper Text Transfer Bash.

After installing, run httb serve.

To test the example site, run cd /var/www && git clone https://github.com/Plasmmer/HTTB_sample-site html

Purpose

Make it easier to power dynamic pages by using Bash instead of PHP, and the Linux's filesystem/JSON files instead of MySQL.

Its like Hugo, but you turn static HTML into dynamic! Without needing PHP nor other hard languages.

This server shouldn't be used in large sites (about security and speed probably), but as a playground for getting familiar with webservers until migrating to NodeJS/PHP and MySQL; so your product can grow with HTTB then later evolve. HTTB isn't available in C/Rust (yet) and had no security audits.

Background

Initially this was just a toy for @Krowemoh see if they could do it, and definitely this project proved you can write a more-than-basic web server as a shell script!

"More-than-basic" server because it can manage user logins/sessions directly from a JSON file, handle requests, file requests, display 404 error messages. Soon™: support to Web3.

Blog post at:

https://nivethan.dev/devlog/a-web-server-in-bash.html

About

The HTTP server purely written in Bash! "HTTB" stands for Hyper Text Transfer Bash. Imagine nginx, but written in shell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 90.1%
  • HTML 9.9%