📜  中间件使用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:10.508000             🧑  作者: Mango

代码示例2
server.use(express.static('./public'));
server.use(express.json());
server.use(express.urlencoded({extended: true}));
const methodOverride = require('method-override');
server.use(methodOverride('_method'));
server.set('view engine', 'ejs');