From a89d60f5886426f12e5d614285fbb51d788c2e75 Mon Sep 17 00:00:00 2001 From: sotech117 Date: Tue, 26 Aug 2025 23:37:53 -0400 Subject: added server code and readme --- upload.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'upload.js') diff --git a/upload.js b/upload.js index 7e91f1a..5df247b 100644 --- a/upload.js +++ b/upload.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const crypto = require('crypto'); +import fs from 'fs'; +import crypto from 'crypto'; // load in google credentials json file const credentialsPath = 'google_credentials.json'; @@ -153,7 +153,7 @@ const getRowsFromTSV = (tsvPath) => { return rows; } -const main = async () => { +export const runUpload = async () => { // // get the data from the tsv // const tsvPath = 'sp500_formatted_data.tsv'; // const tsvData = fs.readFileSync(tsvPath, 'utf8'); @@ -197,6 +197,4 @@ const main = async () => { } catch (error) { console.error('Error:', error); } -} - -main(); \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.3-70-g09d2