cpp-httplib/example/hello.cc

20 lines
349 B
C++
Raw Normal View History

2012-09-25 19:10:19 -07:00
//
// hello.cc
//
// Copyright (c) 2012 Yuji Hirose. All rights reserved.
// The Boost Software License 1.0
//
2012-09-27 18:05:36 -07:00
#include <httplib.h>
2012-09-25 19:10:19 -07:00
int main(void)
{
2012-09-27 17:56:17 -07:00
HTTP_SERVER("localhost", 1234) /* svr_ */ {
GET("/hi", /* req_, res_ */ {
res_.set_content("Hello World!");
2012-09-25 19:10:19 -07:00
});
}
}
// vim: et ts=4 sw=4 cin cino={1s ff=unix