A very simple web server built for CloudABI, making use of Flower networking
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3ecf5e8 Nov 10, 2017

README.md

A simple web server demo for CloudABI

In this repository you can find a relatively simple web server written in C++. It is designed to run on CloudABI, making use of Flower for networking.

Building

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-x86_64-cloudabi.cmake ..
make

Running

flower_switchboard /tmp/switchboard &
cloudabi-run cloudabi-demo-webserver << EOF &
%TAG ! tag:nuxi.nl,2015:cloudabi/
---
http_switchboard: !flower_switchboard_handle
    switchboard_path: /tmp/switchboard
    constraints:
        rights: [SERVER_START]
        in_labels:
            prog: webserver
logger_output: !fd stdout
html_response: <marquee>It works!</marquee>
EOF
sudo flower_ingress_accept 0.0.0.0:80 /tmp/switchboard '{"prog": "webserver"}' &
curl http://localhost/