mili是乙個開源的社群系統,介面優雅,功能豐富。 已在公尺粒網 得到應用,你完全可以用它來搭建自己的社群。mili的前端使用vue、iview等技術來開發,後端使用typescript、nodejs、nestjs、typeorm等技術來開發。
軟體版本
nginx
1.17.1
node.js
8.4.0
mysql
5.6.35
redis
4.0.1
127.0.0.1 dev.golang123.com
請參考如下配置, 請修改日誌目錄
請修改/src/config/cfg.default.ts 檔案中mysql的配置upstream nodejsapi
upstream nodejsstatic
server
location /styles
location /images
location /fonts
location /sockjs-node
location /webpack-dev-server
location /api/v1
location /
}
進入專案目錄,輸入命令export default ,
redis: ,
...}
npm install
進入 /pc 目錄下,輸入命令
npm install
再輸入
npm start
按快捷鍵/src/main.ts",
"|",
"./node_modules/.bin/pino-pretty"
],"env": ,
"sourcemaps": true,
"cwd": "$",
"protocol": "inspector",
"console": "integratedterminal",
"internalconsoleoptions": "neveropen"}]
}
f5
來執行專案
首頁:
管理後台: /admin/
使用者名稱: mili
密碼: 123456
gplmili is gpl licensed.
開源 NodeJS仿WebApi路由
用過webapi或asp.net mvc的都知道微軟的路由設計得非常好,十分方便,也十分靈活。雖然個人看來是有的太靈活了,team內的不同開發很容易使用不同的路由方式而顯得有點混亂。不過這不是重點,我在做node專案的時候就覺得不停的用use 來指定路由路徑很煩人,所以用typescript寫了這個...
nodejs 模組系統
模組系統分為原生系統跟檔案系統,他們的呼叫優先順序為 檔案系統快取區 原生系統 原生系統快取區 檔案系統 1.原生系統 http,path,fs 等 2.載入檔案系統時還可以指定自定義檔案 hello 或者 root node hello 路徑載入 3.mod 非原生系統的檔案系統 node.js ...
nodejs檔案系統
1 讀取檔案 一下子讀取整個檔案 const fs require fs fs.readfile f xpbp kcbp2.81 win32 gx bin log user 20191111 user data0.log function err,data console.log data.tost...