-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
313 changed files
with
245,740 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
var express = require('express'); | ||
var qrTerminal = require('qrcode-terminal'); | ||
|
||
var app = express(); | ||
var misc = require("./lib/misc.js"); | ||
var constants = require("./lib/constants.js"); | ||
|
||
var qrTerminal = require('qrcode-terminal'); | ||
var app = express(); | ||
|
||
const port = 3000 || process.env.PORT; | ||
|
||
var ipv4 = constants.IPv4; | ||
|
||
app.listen(port, (req,res) => { | ||
console.log("Server is live"); | ||
qrTerminal.generate("http://192.168.1.2:3000"); | ||
misc.header(); | ||
qrTerminal.generate(ipv4); | ||
|
||
}); | ||
|
||
app.get('/', (req,res) => { | ||
console.log("A GET req to the server was recieved"); | ||
res.sendFile(__dirname + "/files_to_send" + "/bitcoin.pdf"); | ||
}); | ||
res.sendFile(__dirname + "/files_to_send" + "/" + process.argv[2]); | ||
}); |
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,6 @@ | ||
module.exports = { | ||
owner: "Sagar", | ||
IPv4: "http://192.168.1.2:3000" | ||
} | ||
|
||
//A lot to be added :D |
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,18 @@ | ||
var fig = require('figlet'); | ||
var chalk = require('chalk'); | ||
|
||
module.exports.header = function () { | ||
console.log("--------------------------------------------------"); | ||
console.log("File to be sent: " +process.argv[2]); | ||
console.log("--------------------------------------------------"); | ||
} | ||
|
||
module.exports.emoji = figlet('(〜^∇^)〜', (err, data) => { | ||
if(err) { | ||
console.log('Oops, something went wrong D:'); | ||
return; | ||
} | ||
else { | ||
console.log(data); | ||
} | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.