fix:优化界面
This commit is contained in:
@@ -4,8 +4,6 @@ import morgan from 'morgan';
|
||||
import dotenv from 'dotenv';
|
||||
import path from 'path';
|
||||
|
||||
import { authRouter } from './wechatAuth';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
@@ -18,15 +16,14 @@ const publicDir = path.join(__dirname, '../public');
|
||||
app.use(express.static(publicDir));
|
||||
|
||||
app.get('/health', (_req, res) => {
|
||||
res.json({ status: 'ok' });
|
||||
res.json({ status: 'ok', server: 'node-static' });
|
||||
});
|
||||
|
||||
app.use('/api/auth', authRouter);
|
||||
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
app.listen(port, () => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`WeChat admin backend listening on port ${port}`);
|
||||
console.log(`Static frontend server listening on port ${port}`);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user