diff --git a/README.md b/README.md index b53d881..2c2d0df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,21 @@ httpsvrkit ========== -C++ HTTP sever library +C++ HTTP sever library inspired by [Sinatra](http://www.sinatrarb.com/) [The Boost Software License 1.0](http://www.boost.org/LICENSE_1_0.txt) + +Example +------- + + #include + + int main(void) { + HTTP_SERVER("localhost", 1234) { + GET("/hi", { + res.set_content("Hello World!"); + }); + } + } + +Copyright (c) 2012 Yuji Hirose. All rights reserved. diff --git a/example/hello.cc b/example/hello.cc index 54c5ce3..1e6c283 100644 --- a/example/hello.cc +++ b/example/hello.cc @@ -10,16 +10,8 @@ int main(void) { HTTP_SERVER("localhost", 1234) { - - // const httpsvrkit::Request& req - // httpsvrkit::Response& res - - GET("/hello", { - res.set_content("world"); - }); - - GET("/url", { - res.set_content(req.url); + GET("/hi", { + res.set_content("Hello World!"); }); } }