golny / clask

Web micro-framework like flask in C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clask

C/C++ CI

Very Very Experimental Web micro-framework like flask in C++.

DO NOT USE THIS IN PRODUCTION

Usage

#include "clask/core.hpp"

int main() {
  auto s = clask::server();
  s.GET("/", [](clask::request& req) {
    return "OK!";
  });
  s.GET("/foo", [](clask::response& resp, clask::request& req) {
    resp.set_header("content-type", "text/html");
    resp.write("he<b>l</b>lo");
  });
  s.run();
}

TODO

  • Unescape paths in request
  • Unescape query parameters in request
  • Implement keep-alive
  • Serve static file
  • Responses oriented classes such as JSON

License

MIT

This product contains following third-party libraries:

  • picohttpparser written by kazuho

Author

Yasuhiro Matsumoto (a.k.a. mattn)

About

Web micro-framework like flask in C++.

License:MIT License


Languages

Language:C++ 78.5%Language:HTML 19.3%Language:JavaScript 0.8%Language:CSS 0.7%Language:C 0.6%Language:CMake 0.1%