From b203521a6e1ff477618cdc2465b694927a9b2dd1 Mon Sep 17 00:00:00 2001 From: Adhidarma Hadiwinoto <me@adhisimon.org> Date: Mon, 29 Jul 2019 13:35:52 +0700 Subject: [PATCH] Process title --- config.sample.json | 2 ++ index.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/config.sample.json b/config.sample.json index fc4e151..0367c8e 100644 --- a/config.sample.json +++ b/config.sample.json @@ -1,4 +1,6 @@ { + "name": "SMS", + "# messaging_url": "messaging service url", "messaging_url": "http://localhost:32979/", diff --git a/index.js b/index.js index e35bd24..b2ad52a 100644 --- a/index.js +++ b/index.js @@ -5,5 +5,9 @@ process.chdir(__dirname); const fs = require('fs'); fs.writeFileSync('pid.txt', process.pid); +const config = require('komodo-sdk/config'); +process.title = `KOMODO-${(config && typeof config.name === 'string') ? config.name.toUpperCase() : 'SMS'}`; + + require('./lib/transport'); require('./lib/handler-callback-server'); \ No newline at end of file -- 1.9.0