Proper move of App

This commit is contained in:
Alex Hultman
2019-01-22 09:16:05 +01:00
parent 98d329c912
commit db98f81986
2 changed files with 45 additions and 41 deletions
+4 -4
View File
@@ -12,11 +12,11 @@ int main(int argc, char **argv) {
int hello;
};
uWS::SSLApp({
auto app = uWS::SSLApp({
.key_file_name = "/home/alexhultman/key.pem",
.cert_file_name = "/home/alexhultman/cert.pem",
.passphrase = "1234"
}).get("/exit", [](auto *res, auto *req) {
}).post("/exit", [](auto *res, auto *req) {
if (!token) {
res->end("Server already closed down!");
@@ -60,12 +60,12 @@ int main(int argc, char **argv) {
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
std::cout << "OK per socket data: " << (perSocketData->hello == 13) << std::endl;
}
}).listen(9001, [](auto *token) {
})/*.listen(9001, [](auto *token) {
::token = token;
if (token) {
std::cout << "Listening on port " << 3000 << std::endl;
}
}).run();
})*/.run();
std::cout << "Everything fine, falling through" << std::endl;