pan93412
|
4e434a2691
|
feat(server): add field "identifier"
I'm going to replace the function of "main.js".
|
2022-01-26 14:20:54 +08:00 |
|
pan93412
|
5bf53028ef
|
feat(server): allow passing modules manually
自行維護 require 名單以相容 Webpack。
|
2022-01-26 14:14:24 +08:00 |
|
pan93412
|
fb04e512c0
|
fix(server): remove the shebang line
|
2022-01-26 11:38:08 +08:00 |
|
pan93412
|
0ac00325c8
|
refactor(server): replace the deprecated function
Express 4.x 以上版本已經內建 body-parser。
|
2022-01-26 11:34:35 +08:00 |
|
pan93412
|
7985690987
|
refactor(server): separate server from app
我們需要 NCM API 的伺服器部分,但 app.js
目前的做法讓我們不太好單獨啟動伺服器。
我將 app.js 的伺服器部分抽成各個函數,並將原有
會 blocking 的函數更改為非同步函式。
這樣不僅能最大化善用 Node.js 的 Event Loop,
亦能提升未來維護的程式碼易讀性。
|
2022-01-26 11:29:07 +08:00 |
|