Spaces:
ywxzyy
/
Sleeping

ywxzyy commited on
Commit
3cf353a
·
verified ·
1 Parent(s): 7ce4bdf

Update main.coffee

Browse files
Files changed (1) hide show
  1. main.coffee +12 -1
main.coffee CHANGED
@@ -26,7 +26,18 @@ app.use (req, res, next) ->
26
  # allow user to access file in tmpFolder
27
  app.use '/file', express.static tmpFolder
28
 
29
- app.all '/', (_, res) -> res.send 'POST /upload'
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  app.all '/upload', (req, res) ->
32
  if req.method isnt 'POST'
 
26
  # allow user to access file in tmpFolder
27
  app.use '/file', express.static tmpFolder
28
 
29
+ app.all '/', (_, res) ->
30
+ res.setHeader 'Content-Type', 'application/json'
31
+
32
+ data =
33
+ status: 'alive'
34
+ message: 'POST /upload'
35
+ author: 'newtext'
36
+
37
+ result =
38
+ response: data
39
+
40
+ res.send JSON.stringify result, null, 2
41
 
42
  app.all '/upload', (req, res) ->
43
  if req.method isnt 'POST'