All Projects → minond → servies

minond / servies

Licence: other
Bash micro http framework, yes, bash, that uses netcat to listen for and respond to HTTP requests.

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to servies

Xweb
High performance async web framework.
Stars: ✭ 314 (+1062.96%)
Mutual labels:  microframework
Jooby
The modular web framework for Java and Kotlin
Stars: ✭ 1,309 (+4748.15%)
Mutual labels:  microframework
Lit
World's smallest responsive 🔥 css framework (395 bytes)
Stars: ✭ 1,866 (+6811.11%)
Mutual labels:  microframework
Kapow
Kapow! If you can script it, you can HTTP it.
Stars: ✭ 526 (+1848.15%)
Mutual labels:  microframework
Tg2
Python web framework with full-stack layer implemented on top of a microframework core with support for MongoDB, Pluggable Applications and autogenerated Admin
Stars: ✭ 756 (+2700%)
Mutual labels:  microframework
Djng
Turtles all the way down
Stars: ✭ 127 (+370.37%)
Mutual labels:  microframework
Light-PHP
Easy, Lightweight, open source and magic-free PHP framework
Stars: ✭ 44 (+62.96%)
Mutual labels:  microframework
Django Micro
Django as a microframework
Stars: ✭ 245 (+807.41%)
Mutual labels:  microframework
Chubbyphp Framework
A based PSR-15 microframework that also sets maximum flexibility with minimum complexity and easy replaceability of the individual components, but also of the framework.
Stars: ✭ 69 (+155.56%)
Mutual labels:  microframework
Niapy
Python microframework for building nature-inspired algorithms. Official docs: http://niapy.readthedocs.io/en/stable/
Stars: ✭ 148 (+448.15%)
Mutual labels:  microframework
Dispatch
a tiny library for quick and easy PHP 5.6+ apps
Stars: ✭ 535 (+1881.48%)
Mutual labels:  microframework
Mooa
Mooa 是一个为 Angular 服务的微前端框架。A independent-deployment micro-frontend Framework for Angular from single-spa.
Stars: ✭ 755 (+2696.3%)
Mutual labels:  microframework
Grip
The microframework for writing powerful web applications.
Stars: ✭ 137 (+407.41%)
Mutual labels:  microframework
Router
🛣 Simple Navigation for iOS
Stars: ✭ 438 (+1522.22%)
Mutual labels:  microframework
Rubotnik
"Bot-end" Ruby framework to quickly build and launch a Facebook Messenger chatbot
Stars: ✭ 191 (+607.41%)
Mutual labels:  microframework
Ctpbee
个人自动交易解决方案 / 持续维护中
Stars: ✭ 301 (+1014.81%)
Mutual labels:  microframework
Susanoo
[DEPRECATED] A micro Web framework for Rust, based on Hyper and Tokio
Stars: ✭ 103 (+281.48%)
Mutual labels:  microframework
aleph
A simple PHP framework for very small sites
Stars: ✭ 14 (-48.15%)
Mutual labels:  microframework
Receiver
Swift µframework implementing the Observer pattern 📡
Stars: ✭ 238 (+781.48%)
Mutual labels:  microframework
Harmony
A simple and flexible PHP middleware dispatcher based on PSR-7, PSR-11, and PSR-15
Stars: ✭ 144 (+433.33%)
Mutual labels:  microframework

Build Status

servies is a bash micro-framework that uses netcat to listen for and respond to HTTP requests.

example

route definitions are done using this method: [http method] [url pattern] [command]. your request handlers can be one-liners:

get "/hi/:name" echo 'hi $name, how are you??'

you can, of course, define your own commands/functions and use those as well. I won't include an example of that because it's not "dead sexy" (yeah, that's for you)

anything sent to stdout by your handler function or command will be sent back as the response body, but there's also a status and a header command that you can use to customize the status code and to add any header you want. checkout the sample.sh file for an example.

routes

required (:something) and optional (:something?) route parameters are supported. during the routing, servies will extract these values from the url and declare them as variables you can use. if you want to use variables in these, make sure to declare your handlers using single (or escape the dollar sign) quotes so that the variables are evaluated during the routing

usage

let's say you saved your route definitions to a file named app. to start that server, just run servies app, and that will make netcat listen to requests made to your local host on port 8080 and route your requests. you can also set a PORT and/or a HOST variable to bind netcat to something other than the default 0.0.0.0:8080.

installing

clone the repo and run make install (you may need to sudo that)

tests

start the sample application, by running ./servies sample.sh, then run make test

bash

I wrote this and tested this using GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu), shell (sh) won't do. and that's on Linux.

dependencies

I believe the only package that servies uses that does not come with most Linux distros is netcat.

important

I think most of what I'm going to say does without saying, but I'll say it anywa. don't use this for anything on "production." it can't handle a whole lot of usage, and let's not even get started on the security issues something like this has. I mean, you can do something like this get "/:file" cat \$file and make most of your file system avialable. and there are plenty of other ways a bash/sh command can compromise your system.

also important

if you are going to use this, then I do ask that you only browse what ever you build using Links (jk)

thanks

thank you to this SO response that showed me how to redirect nc calls to a command

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