dispatch.js 478 Bytes
const middleware = require('./middleware');

module.exports = (app) => {
    app.get('/', (req, res) => {
        res.send('首页');
    });

    // old yas
    app.get('/apm/yas.gif', middleware.apm);

    // docker验证项目是否正常发布
    app.use('/node/status.html', (req, res) => {
        return res.status(204).end();
    });

    // new yas
    app.get('/apm/yas2.gif', middleware.getip, middleware.clientApm);
    app.post('/write', middleware.serverApm);
};