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.
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-x86_64-cloudabi.cmake ..
make
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/