Skip to content

Commit

Permalink
Added dependencies and files
Browse files Browse the repository at this point in the history
  • Loading branch information
ionicc committed Mar 28, 2018
1 parent 3d6a7c1 commit d5442a9
Show file tree
Hide file tree
Showing 313 changed files with 245,740 additions and 5 deletions.
16 changes: 11 additions & 5 deletions index.js
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]);
});
6 changes: 6 additions & 0 deletions lib/constants.js
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
18 changes: 18 additions & 0 deletions lib/misc.js
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);
}
});
13 changes: 13 additions & 0 deletions node_modules/figlet/.jshintrc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/figlet/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions node_modules/figlet/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions node_modules/figlet/Gruntfile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions node_modules/figlet/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d5442a9

Please sign in to comment.