Changed to take host-name instead of address.

This commit is contained in:
yhirose 2012-09-24 20:49:00 -04:00
parent c5c1c4d412
commit 3fbd3afb6c
2 changed files with 23 additions and 31 deletions

View file

@ -23,14 +23,10 @@ int main(void)
});
svr.get("/item/:name", [](Context& cxt) {
try {
cxt.response.body = cxt.request.params.at("name");
} catch (...) {
// Error...
}
cxt.response.body = cxt.request.params.at("name");
});
svr.run("0.0.0.0", 1234);
svr.run("localhost", 1234);
}
// vim: et ts=4 sw=4 cin cino={1s ff=unix