summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Zhineng <[email protected]>2025-07-01 10:13:45 +0800
committerLi Zhineng <[email protected]>2025-07-01 10:13:45 +0800
commite7e1f09b4c7f6b193c86bdb653085c18140a98b8 (patch)
treea0fa7ce7889af5b65b859518239443f340fc074b
parent6c08d379ab4f1dbc879ab796553c7202f5d2e7b1 (diff)
downloadserver-e7e1f09b4c7f6b193c86bdb653085c18140a98b8.tar.gz
server-e7e1f09b4c7f6b193c86bdb653085c18140a98b8.zip
format
-rw-r--r--server.mjs14
1 files changed, 7 insertions, 7 deletions
diff --git a/server.mjs b/server.mjs
index 43da1f3..043c332 100644
--- a/server.mjs
+++ b/server.mjs
@@ -4,15 +4,15 @@ const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' })
if (req.method === 'GET' && req.url === '/gettime') {
- res.end(JSON.stringify({
- time: Math.floor(Date.now() / 1000)
- }))
+ res.end(JSON.stringify({
+ time: Math.floor(Date.now() / 1000)
+ }))
} else if (req.method === 'GET' && req.url.startsWith('/eagle')) {
- res.end(JSON.stringify({
- status: 200, data: { eagleId: 0 }
- }))
+ res.end(JSON.stringify({
+ status: 200, data: { eagleId: 0 }
+ }))
} else {
- res.end('It works!\n')
+ res.end('It works!\n')
}
})