| 67 | |
| 68 | protected: |
| 69 | void initialize() override |
| 70 | { |
| 71 | // route("/vars", None(), &MyProcess::vars); |
| 72 | route("/vars", None(), [=](const Request& request) { |
| 73 | string body = "... vars here ..."; |
| 74 | return OK(body); |
| 75 | }); |
| 76 | |
| 77 | // install("stop", &MyProcess::stop); |
| 78 | install("stop", [=](const UPID& from, const string& body) { |
| 79 | terminate(self()); |
| 80 | }); |
| 81 | } |
| 82 | |
| 83 | private: |
| 84 | Promise<int> promise; |