KSR restart
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
(defNew []
|
(defNew []
|
||||||
[&mut :String image ""
|
[&mut :String image ""
|
||||||
&mut :Continuation cc null
|
&mut :Continuation cc null
|
||||||
&mut :String->Void resolve null]
|
&mut :String->Void resolve null
|
||||||
|
&mut :Dynamic connection null]
|
||||||
(let [app (Express.call)
|
(let [app (Express.call)
|
||||||
port 3000]
|
port 3000]
|
||||||
(app.use (Express.static_.call (Sys.getCwd)))
|
(app.use (Express.static_.call (Sys.getCwd)))
|
||||||
@@ -22,8 +23,13 @@
|
|||||||
(whenLet [_resolve resolve] (set resolve null) (_resolve req.query.value))
|
(whenLet [_resolve resolve] (set resolve null) (_resolve req.query.value))
|
||||||
(res.redirect "/")
|
(res.redirect "/")
|
||||||
})
|
})
|
||||||
|
(app.get "/restart" ->[req :Dynamic res next] {
|
||||||
|
(res.redirect "/")
|
||||||
|
(connection.close)
|
||||||
|
(kiss_spaced_rep.Main_.main)
|
||||||
|
})
|
||||||
(#unless test
|
(#unless test
|
||||||
(app.listen port ->(print "kiss-express listening at http://localhost:$port")))))
|
(set connection (app.listen port ->(print "kiss-express listening at http://localhost:$port"))))))
|
||||||
|
|
||||||
(method :Void clear []
|
(method :Void clear []
|
||||||
(set content ""))
|
(set content ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user