JSON.parse only object keys
$ npm i parse--keys --save
//server.js
'use strict'
var parse = require('parse-keys');
var env = parse(process.env, ['PORT']);
console.log(process.env.PORT) === "4000"
//while
console.log(env.PORT) === 4000
$ PORT=4000 node server.js