Node.js Express 路由:动态颜色变化的网页标题
var express = require('express'); var app = express();
var colors = ['red', 'yellow', 'green', 'blue']; var currentColorIndex = 0;
app.get('/color.html', function(req, res) { var color = colors[currentColorIndex]; var html = '
app.listen(3000, function() { console.log('Server listening on port 3000'); });
原文地址: https://www.cveoy.top/t/topic/mreE 著作权归作者所有。请勿转载和采集!