0
0
mirror of https://github.com/fawazahmed0/exchange-api.git synced 2025-06-29 18:21:14 +00:00

create rootdir if doesn't exists

This commit is contained in:
Fawaz Ahmed 2024-02-29 21:11:14 +05:30
parent 33d54d42ac
commit 1a8f42e94f

View File

@ -61,7 +61,7 @@ async function begin() {
const currJSON = await getCurrencies()
// Get & Save All the available currencies in api
const availCurrListObj = await getAvailCurrencyJSON(currJSON)
fs.writeFileSync(path.join(rootDir, 'currencies.min.json'), JSON.stringify(availCurrListObj))
fs.outputFileSync(path.join(rootDir, 'currencies.min.json'), JSON.stringify(availCurrListObj))
fs.writeFileSync(path.join(rootDir, 'currencies.json'), JSON.stringify(availCurrListObj, null, indent))
// Generate API files