print static directory
This commit is contained in:
@@ -9,8 +9,10 @@
|
|||||||
&mut :String->Void resolve null
|
&mut :String->Void resolve null
|
||||||
&mut :Dynamic connection null]
|
&mut :Dynamic connection null]
|
||||||
(let [app (Express.call)
|
(let [app (Express.call)
|
||||||
port 3000]
|
port 3000
|
||||||
(app.use (Express.static_.call (#if STATIC_DIR (#value "STATIC_DIR") (Sys.getCwd))))
|
staticDir (#if STATIC_DIR (#value "STATIC_DIR") (Sys.getCwd))]
|
||||||
|
(print "Using $staticDir for static file directory")
|
||||||
|
(app.use (Express.static_.call staticDir))
|
||||||
(app.get "/" ->[req :Dynamic res next]
|
(app.get "/" ->[req :Dynamic res next]
|
||||||
(res.send content))
|
(res.send content))
|
||||||
(app.get "/image/:path" ->[:Dynamic req :Dynamic res next]
|
(app.get "/image/:path" ->[:Dynamic req :Dynamic res next]
|
||||||
|
|||||||
Reference in New Issue
Block a user