All Projects → chris-rock → Vesper

chris-rock / Vesper

Licence: apache-2.0
🍸Vesper - HTTP Framework for Bash Shell

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Vesper

Tuicss
Text-based user interface CSS library
Stars: ✭ 167 (-4.57%)
Mutual labels:  framework
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+1106.86%)
Mutual labels:  framework
Spring Data Jpa
Simplifies the development of creating a JPA-based data access layer.
Stars: ✭ 2,238 (+1178.86%)
Mutual labels:  framework
Legui
Java OpenGL GUI library. Created for using with latest LWJGL (LWJGL 3).
Stars: ✭ 167 (-4.57%)
Mutual labels:  framework
Bahunya
10KB classless CSS framework with responsive typography, navbar, syntax highlighting, etc.
Stars: ✭ 170 (-2.86%)
Mutual labels:  framework
Swiftycontacts
A Swift library for Contacts framework.
Stars: ✭ 171 (-2.29%)
Mutual labels:  framework
P1
一个基于EgretEngine的开发框架
Stars: ✭ 168 (-4%)
Mutual labels:  framework
Sifrr
⚡️ Set of tiny, independent libraries for creating modern and fast webapps with javascript/typescript
Stars: ✭ 174 (-0.57%)
Mutual labels:  framework
Yandex Tank
Load and performance benchmark tool
Stars: ✭ 2,110 (+1105.71%)
Mutual labels:  framework
Woowahanjs
웹 어플리케이션 개발을 위한 JS프레임워크
Stars: ✭ 171 (-2.29%)
Mutual labels:  framework
Alfy
Create Alfred workflows with ease
Stars: ✭ 2,232 (+1175.43%)
Mutual labels:  framework
Amplesdk
Ample SDK - JavaScript UI Framework
Stars: ✭ 169 (-3.43%)
Mutual labels:  framework
Goldeneye
The CQRS flavoured framework that will speed up your WebAPI and Microservices development
Stars: ✭ 171 (-2.29%)
Mutual labels:  framework
Raj
The Elm Architecture for JavaScript
Stars: ✭ 169 (-3.43%)
Mutual labels:  framework
Discord Backup
📦 Complete framework to facilitate server backup using discord.js v12
Stars: ✭ 172 (-1.71%)
Mutual labels:  framework
Blink Mind
Fully customizable mindmap framework for react.js. 支持插件的,可被完全定制的思维导图库,基于react.js和immutable.js。
Stars: ✭ 169 (-3.43%)
Mutual labels:  framework
Fiber
⚡️ Express inspired web framework written in Go
Stars: ✭ 17,334 (+9805.14%)
Mutual labels:  framework
Fe
前端热门文章阅读
Stars: ✭ 174 (-0.57%)
Mutual labels:  framework
Oxide
Old repository for the Oxide mod. See individual repositories for updates
Stars: ✭ 173 (-1.14%)
Mutual labels:  framework
Thenextquant
Asynchronous driven quantitative trading framework.
Stars: ✭ 172 (-1.71%)
Mutual labels:  framework

Vesper - HTTP Framework for Bash Shell

Vesper Logo

vesper is a collection of shell functions to make it super easy to generate valid http responses. Vesper is not a web server itself, its just the framework to parse http requests and generate valid responses.

This is crazy, who needs a http framework for unix shell?

That is a very good question! If you would have asked me that question a year ago, I would have argued: nobody. Now, I am not sure anymore. How will sh/bash scripts work in the future of cloud and serverless? Consider reading my blog Introducing Vesper - HTTP Framework for Unix Shell.

Get Started

Hello World

source "vesper.sh"

# parses the http request
http_request

# generate the response
http_response StatusOK "text/plain"
echo 'Hello World'
echo $HTTP_REQUEST_URI

Generate an Image

source "vesper.sh"

http_response StatusOK "image/jpeg"
echo "James Bond" | convert -font Arial -pointsize 72 -fill white -background black text:- -trim png:- >&1

Seeing is believing

# hello world example
ncat -lk -p 8081 --sh-exec examples/helloworld.sh

# json example
ncat -lk -p 8081 --sh-exec examples/json.sh

# image example
ncat -lk -p 8081 --sh-exec examples/image.sh

# pdf example
ncat -lk -p 8081 --sh-exec examples/pdf.sh

# file streaming example
ncat -lk -p 8081 --sh-exec examples/file_stream.sh

# router example
ncat -lk -p 8081 --sh-exec examples/router.sh

Examples

To see all the examples in place justs run:

Start the server

# download the test pdf
wget http://tiswww.case.edu/php/chet/bash/rose94.pdf

# start the server
ncat -lk -p 8081 --sh-exec ./examples/router.sh

vesper cli

Visit the url localhost:8081

vesper browser output

Dependencies

  • ncat - used to execute the bash scripts on incoming requests
  • cat - used to pipe file content
  • file - used to determine the mime type
  • stat - used to determine the file size

Debian

apt-get install ncat
apt-get install file

Centos

yum install nmap
yum install file

Mac

brew install nmap

FAQ

Why is the project named vesper?

Popular web frameworks like martini and gin are named after cocktails and one of James Bond's famous cocktails is called vesper.

Is vesper production ready?

Its build on tooling that is around for decades. The foundation is battle-tested. While this is the case, its not designed for web-scale workloads.

Should I switch from my popular http framework X to vesper?

Most likely not

Are there limitations

At this point, its only tested with http GET methods

Open questions

  • What is the best way to handle execution errors?
  • What is the stable way to verify http query params?

Authors

  • Christoph Hartmann - Research & Prototype - chris-rock

See also the list of contributors who participated in this project.

Sponsors

The research and the development was sponsored by mondoo

License

This project is licensed under the Apache 2 License - see the LICENSE.md file for details

Acknowledgments

shinatra and bashttpd also prototyped around http in bash.

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].