Skip to content

Commit

Permalink
完善目录结构,session等信息
Browse files Browse the repository at this point in the history
  • Loading branch information
shitiandmw committed Jan 16, 2024
1 parent 7164fa2 commit d690893
Show file tree
Hide file tree
Showing 20 changed files with 5,508 additions and 269 deletions.
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const Koa = require('koa');
const { PluginLoader } = require('wbrick');


const pluginLoader = new PluginLoader();
pluginLoader.initialize().then(() => {
const app = new Koa();
// 设置cookie签名密钥
app.keys = ["d609c5d520c70e29997f2acb0eb84277f92fcfdc63c70650d069d2544d6bd94d","277f8186d5c06223a5b78a3ef7256f8fedb938313919a594b6d0bb02c07d6a5a"];
// 插件路由中间件
app.use(pluginLoader.getRouteMiddleware());
app.listen(3000, () => {
console.log('Server running on http://localhost:3000');
Expand Down
10 changes: 10 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignore": [
"**/node_modules/*",
"**/package-lock.json"
],
"watch": [
"**/*.js"
],
"exec": "node app.js"
}
Loading

0 comments on commit d690893

Please sign in to comment.