Files
caprover/dev-scripts/clear-pro-config.js
T
Kasra Bigdeli b7c114ed7d 1.11.1 hotfix (#1886)
* Update CHANGELOG.md

* Update TERMS_AND_CONDITIONS.md

* Update TERMS_AND_CONDITIONS.md

* Adding script to clear pro config

* Fixed https://github.com/caprover/caprover/issues/1863

* Closes https://github.com/caprover/caprover-pro/issues/3

* Updated the changelog

* Fixed https://github.com/caprover/caprover/discussions/1859

* updated the changelogs

* Fixed https://github.com/caprover/caprover/issues/1871

* Upped version - ready for hotfix
2023-09-16 20:52:08 -07:00

17 lines
391 B
JavaScript

/*jshint esversion: 6 */
const fs = require('fs-extra')
const CONFIG_FILE_PATH = '/captain/data/config-captain.json'
const fileContent = JSON.parse(
fs.readFileSync(CONFIG_FILE_PATH, {
encoding: 'utf-8',
})
)
fs.writeFileSync(CONFIG_FILE_PATH + '.backup', JSON.stringify(fileContent))
fileContent.pro = {}
fs.writeFileSync(CONFIG_FILE_PATH, JSON.stringify(fileContent))