Commit 5339a483244414a8c19f9b93bf77c7417225c9e0

Authored by Adhidarma Hadiwinoto
1 parent 139f4b3fb0
Exists in master and in 1 other branch webadmin

APISERVER.index cleanup

Showing 1 changed file with 3 additions and 6 deletions Side-by-side Diff

lib/apiserver/index.js
... ... @@ -10,16 +10,13 @@ const handlerOnReceived = require('./handler/on-received');
10 10 const app = express();
11 11  
12 12 const accessLogStream = rfs('access_log', {
13   - interval: '1d', // rotate daily
  13 + interval: '1d',
14 14 path: './logs',
15 15 });
16   -app.use(morgan, 'combined', { stream: accessLogStream });
17 16  
18   -function handlerPing(req, res) {
19   - res.end('PONG');
20   -}
  17 +app.use(morgan, 'combined', { stream: accessLogStream });
21 18  
22   -app.get('/ping', handlerPing);
  19 +app.get('/ping', (req, res) => { res.end('PONG'); });
23 20 app.get('/service', handlerOnReceived);
24 21  
25 22 const listenPort = config.apiserver.port;