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
const axios = require('axios').default; | |
const secret = 'SECRET'; | |
const appname = 'Your-App'; | |
/** | |
* Google Authenticator API: https://authenticatorapi.com/ | |
* | |
* App Store: https://apps.apple.com/de/app/google-authenticator/id388497605 | |
* Play Store: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=de&gl=US |
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
const bcrypt = require('bcrypt'); | |
module.exports = { | |
/** | |
* Use this to hash a password | |
* @param {String} input | |
* @returns Promise<String> | |
*/ | |
encript: (input) => { | |
return new Promise((resolve, rejects) => { |
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
module.exports = class Response { | |
constructor(response) { | |
this.code = response.statusCode; | |
this.date = new Date(); | |
this.error = []; | |
this.data = {}; | |
return this; |
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
const fs = require("fs"); | |
const path = require("path"); | |
const directoryPath = "./input"; // Replace with your directory path | |
fs.readdir(directoryPath, (err, files) => { | |
if (err) { | |
console.error("Error reading the directory", err); | |
return; | |
} |
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
#!/bin/bash | |
# Check if the correct number of arguments is provided | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: $0 <domain> <port> <dockerfile_dir> <email>" | |
exit 1 | |
fi | |
DOMAIN=$1 | |
PORT=$2 |