style: fix indent
This commit is contained in:
parent
899e6d5852
commit
9b40f22671
24
index.js
24
index.js
@ -14,11 +14,11 @@ app.use(cookieParser()); //解析 HTTP 請求的 cookie
|
|||||||
|
|
||||||
// // routing
|
// // routing
|
||||||
// // pages
|
// // pages
|
||||||
+app.use("/example", require("./pages/example.js"));
|
app.use("/example", require("./pages/example.js"));
|
||||||
+app.use("/main", require("./pages/main.js"));
|
app.use("/main", require("./pages/main.js"));
|
||||||
+app.use("/login", require("./pages/login.js"));
|
app.use("/login", require("./pages/login.js"));
|
||||||
+app.use("/apply", require("./pages/apply.js"));
|
app.use("/apply", require("./pages/apply.js"));
|
||||||
+app.use("/audit", require("./pages/audit.js"));
|
app.use("/audit", require("./pages/audit.js"));
|
||||||
|
|
||||||
// // api
|
// // api
|
||||||
app.use("/api/login", require("./api/login.js"));
|
app.use("/api/login", require("./api/login.js"));
|
||||||
@ -39,16 +39,16 @@ const port = 5001;
|
|||||||
// 如何處理不同的 request,參數分別為 url 和要執行的 function
|
// 如何處理不同的 request,參數分別為 url 和要執行的 function
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
res.send('hello world!')
|
res.send('hello world!')
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get('/bye', (req, res) => {
|
app.get('/bye', (req, res) => {
|
||||||
res.send('bye!')
|
res.send('bye!')
|
||||||
})
|
})
|
||||||
|
|
||||||
// 運行這個 port,參數分別為 port 和要執行的 function
|
// 運行這個 port,參數分別為 port 和要執行的 function
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`Example app listening at http://localhost:${port}`)
|
console.log(`Example app listening at http://localhost:${port}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user