@enplug/scripts
Version:
Enplug scripts
17 lines (14 loc) • 532 B
JavaScript
const path = require('path');
const chalk = require('chalk');
const fs = require('fs');
/**
* Loads `dev.private.json` file from project root.
* File may contain following properties:
* - `cert` and `key` properties pointing to ssl certificate and key.
* - `token` being a valid token used to make request to Enplug backend.
*/
function loadDevPrivateFile(rootPath) {
const filePath = path.join(rootPath, 'dev.private.json');
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
}
module.exports = loadDevPrivateFile;