//This is my index.js file
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Movie Database' });
});
module.exports = router;
//This is my index.jade file
extends layout
block content
h1= title
p Welcome to #{title}
Finally, I want to do the same thing using json.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.