@rapido/env
Version:
Modules to manage environment variables in Rapido apps.
19 lines (14 loc) • 424 B
JavaScript
/**
* Copyright (c) 2019-present Verum Technologies
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
;
const fs = require('fs');
const path = require('path');
function init(envars) {
const envPath = path.resolve(__dirname, 'env.json');
fs.writeFileSync(envPath, `${JSON.stringify(envars)}\n`);
}
module.exports = init;