Skip to content

Commit f231bbc

Browse files
committed
fix: add welcome page with link to repository
1 parent 364c2fa commit f231bbc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/router.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ const getSampleEndpoint = require("./endpoints/get-sample.js")
99
const patchSampleEndpoint = require("./endpoints/patch-sample.js")
1010
const downloadEndpoint = require("./endpoints/download-session.js")
1111

12+
const welcome = (req, res) =>
13+
micro.send(
14+
res,
15+
200,
16+
"This is a UDT Collaboration Server, learn more at https://github.com/UniversalDataTool/collaboration-server"
17+
)
1218
const notfound = (req, res) => micro.send(res, 404)
1319

1420
module.exports = router(
@@ -22,5 +28,6 @@ module.exports = router(
2228
get("/api/session/:session_id", getSessionEndpoint),
2329
patch("/api/session/:session_id", patchSessionEndpoint),
2430
options("/api/session/:session_id", patchSessionEndpoint),
31+
get("/", welcome),
2532
get("/*", notfound)
2633
)

0 commit comments

Comments
 (0)