mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
34 lines
587 B
JavaScript
34 lines
587 B
JavaScript
const { writeFile } = require('fs').promises
|
|
const { join } = require('path')
|
|
|
|
/**
|
|
* JSON_TEMPLATE = {[key:string]{...pros}}
|
|
*/
|
|
const JSON_TEMPLATE = {
|
|
provider: {
|
|
vendor: '',
|
|
},
|
|
database: {
|
|
host: '',
|
|
password: '',
|
|
port: '',
|
|
username: '',
|
|
db: '',
|
|
},
|
|
io: {
|
|
vendor: '',
|
|
},
|
|
}
|
|
|
|
const PATH_CONFIG = join(process.cwd(), 'config.json')
|
|
|
|
const jsonConfig = () => {
|
|
return writeFile(
|
|
PATH_CONFIG,
|
|
JSON.stringify(JSON_TEMPLATE, null, 2),
|
|
'utf-8'
|
|
)
|
|
}
|
|
|
|
module.exports = { jsonConfig }
|