var express = require('express');
var app = express(); 

app.get('/',function(req,res){
res.redirect('/admin');
});

app.get('/admin',function(req,res){
    res.send('欢迎管理员');
});

app.listen(3000);

当我们访问:http://localhost:3000/时将自动调整到http://localhost:3000/admin

相关文章:

  • 2022-01-03
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-03-10
  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案