区分客户端调试模式和生产模式端口

master
pan 4 years ago
parent d69ccb34ae
commit 3201880517
  1. 4
      app.js
  2. 2
      routes/project/info.js

@ -25,8 +25,10 @@ app.use(express.urlencoded({ extended: false }));
app.use(cookieParser()); app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'public')));
console.debug(`webClient:${process.env.webClient}`)
app.use(cors({ app.use(cors({
origin:[process.env.webClient], origin:[process.env.webClient,process.env.devClient],
credentials:true credentials:true
})) }))
app.use('/', indexRouter); app.use('/', indexRouter);

@ -41,7 +41,7 @@ router.get('/member', function (req, res, next) {
company:()=>Mock.Random.word(), company:()=>Mock.Random.word(),
department:()=>Mock.Random.word(), department:()=>Mock.Random.word(),
specialty:()=>Mock.Random.word(), specialty:()=>Mock.Random.word(),
time:()=>Mock.Random.datetime(), time:()=>Mock.Random.date(),
note:()=>Mock.Random.sentence(3, 5) note:()=>Mock.Random.sentence(3, 5)
}) })
res.json(data) res.json(data)

Loading…
Cancel
Save