dev-info.js
390 Bytes
const fs = require('fs');
const path = require('path');
const info = {
host: '127.0.0.1',
port: 5002,
publicPath: 'http://127.0.0.1:5002'
};
try {
let dev = JSON.parse(fs.readFileSync(path.join(__dirname, '../../.devhost')));
info.host = dev.host;
info.publicPath = `http://${info.host}:${info.port}/`;
} catch (e) {
console.log(e);
}
module.exports = info;