在Node.js中,如何从其他文件中“包括”函数?
var express = require('express');var app = express.createServer();app.set('views', __dirname + '/views');app.set('view engine', 'ejs');app.get('/', function(req, res){ res.render('index', {locals: { title: 'NowJS + Express Example' }});});app.listen(8080);
相关分类