You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-csc-ui/bin/config-create.js

12 lines
482 B

const path = require('path')
const fs = require('fs')
// eslint-disable-next-line node/no-path-concat
const filePathTemplate = path.resolve(__dirname + '/../src/config/app.template.root.js')
// eslint-disable-next-line node/no-path-concat
const filePathConfig = path.resolve(__dirname + '/../src/config/app.js')
const template = fs.readFileSync(filePathTemplate, 'utf8')
const rendered = template.split('{{host}}').join(process.argv[2])
fs.writeFileSync(filePathConfig, rendered)