From 5339a483244414a8c19f9b93bf77c7417225c9e0 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Fri, 6 Dec 2019 12:16:11 +0700
Subject: [PATCH] APISERVER.index cleanup

---
 lib/apiserver/index.js | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/apiserver/index.js b/lib/apiserver/index.js
index a32047d..71c194f 100644
--- a/lib/apiserver/index.js
+++ b/lib/apiserver/index.js
@@ -10,16 +10,13 @@ const handlerOnReceived = require('./handler/on-received');
 const app = express();
 
 const accessLogStream = rfs('access_log', {
-    interval: '1d', // rotate daily
+    interval: '1d',
     path: './logs',
 });
-app.use(morgan, 'combined', { stream: accessLogStream });
 
-function handlerPing(req, res) {
-    res.end('PONG');
-}
+app.use(morgan, 'combined', { stream: accessLogStream });
 
-app.get('/ping', handlerPing);
+app.get('/ping', (req, res) => { res.end('PONG'); });
 app.get('/service', handlerOnReceived);
 
 const listenPort = config.apiserver.port;
-- 
1.9.0