-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.js
More file actions
28 lines (23 loc) · 788 Bytes
/
util.js
File metadata and controls
28 lines (23 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var colors = require("colors/safe")
var shareWhereLogo =
" ___ _ __ ___ \n" +
" / __| |_ __ _ _ _ __\\ \\ / / |_ ___ _ _ ___ \n" +
" \\__ \\ ' \\/ _` | '_/ -_) \\/\\/ /| ' \\/ -_) '_/ -_)\n" +
" |___/_||_\\__,_|_| \\___|\\_/\\_/ |_||_\\___|_| \\___|";
module.exports = {
printLogo: function() {
console.log(colors.cyan.bold(shareWhereLogo))
console.log(colors.yellow(" Written for COP 4331C at UCF during Spr2015"));
console.log();
},
getSuitablePort: function() {
var port = 80; // default on Windows
// on POSIX systems, fall back to another port
if(process.getuid && process.getuid != 0)
port = 8000;
return port;
},
isEmptyObject: function(obj) {
return !Object.keys(obj).length;
}
}