1234567891011121314151617181920212223242526272829303132333435 |
- /* appjet:version 0.1 */
- /* appjet:library */
- // (c) 2009, Herbert Vojčík
- // Licensed by MIT license (http://www.opensource.org/licenses/mit-license.php)
- import("lib-app/liveui", "lib-app/mvp");
- page.setView(box(
- H1("Default page"),
- sub(data("missingDomain"), box(P("Cannot find handler for domain: ", data())))
- ));
- function get_main() {
- page.setViewModel({missingDomain:request.headers.Host});
- }
- import("storage");
- function get_localhostsetup() {
- if (!storage.bootTable) { storage.bootTable = {}; }
- storage.bootTable["localhost:8080"] = request.query;
- page.setView(P("Localhost setup successful"));
- }
- import("lib-../config");
- import("lib-app/patches");
- dispatchShouldSearchHere();
- mvp();
- storage._last0Request = request.toString();
- response.setStatusCode(404);
- function get_last0request() {
- printp(storage._last0Request);
- }
|