From 571ac6d782a237899d4f3c7f746477c40028457f Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 10 May 2022 12:06:09 -0500 Subject: [PATCH] Wait for and confirrm toml file --- helpers/api/static.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/api/static.js b/helpers/api/static.js index 2809a6e..a09984d 100644 --- a/helpers/api/static.js +++ b/helpers/api/static.js @@ -18,11 +18,16 @@ export async function downloadStorkToml () { // await axios( apiUrl.toString() ) - axios({ + await axios({ method: "get", url: apiUrl.toString(), responseType: "stream" }).then(function (response) { response.data.pipe(fs.createWriteStream( storkTomlPath )) }) + + // Get toml file stats + const stats = await fs.stat( storkTomlPath ) + console.log('TOML Stats', storkTomlPath, stats) + // console.log('TOML Stats', stats) }