-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: connection to firebase database for setting questions
- Loading branch information
1 parent
8c196fc
commit 93940a0
Showing
15 changed files
with
832 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const { readFile, writeFile } = require('fs'); | ||
const path = require('path'); | ||
// process.argv | ||
// let filename = fs.open(process.argv([1])) | ||
|
||
// console.log(process.argv); | ||
// console.log(process.argv.indexOf('--file')) | ||
const path_idx = process.argv.indexOf('--file') + 1; | ||
|
||
if (path_idx < 1 || process.argv.length < path_idx) { | ||
console.log(` | ||
invalid arguments supplied !! | ||
please try with arguments: | ||
--file [ path_of_the_file ] | ||
`); | ||
process.exit(1); | ||
} | ||
|
||
const filename = process.argv[path_idx]; | ||
|
||
let file = readFile(filename, (err, data) => { | ||
let content = data.toString('base64'); | ||
|
||
console.log(content, '\n'); | ||
|
||
writeFile(`${filename}.txt`, content, (err) => { | ||
if (err) { | ||
console.log('Could not write to the file'); | ||
process.exit(1); | ||
} else { | ||
console.log(`successfully wrote key to ${path.resolve(filename)}.txt`); | ||
process.exit(0); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
93940a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cit-coin-ui – ./
cit-coin-ui-git-dev-pitpa.vercel.app
cit-coin-ui.vercel.app
cit-coin-ui-pitpa.vercel.app