Skip to content

Commit 01e00b8

Browse files
committed
minor fixes
1 parent d47fad4 commit 01e00b8

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/lib/server.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ var path = require('path');
66
var app = express();
77
var program = require('commander');
88
app.set('view engine', 'ejs');
9-
app.set('views',__dirname+'/views/');
10-
app.use(express.static(__dirname+'/public/'));
9+
app.set('views', __dirname + '/views/');
10+
app.use(express.static(__dirname + '/public/'));
1111

1212
program
1313
.version('0.0.1')
14-
.option('-d, --dir <directory>',"Directory to Serve")
15-
.option('-p, --port <number>',"Port",parseInt)
14+
.option('-d, --dir <directory>', "Directory to Serve")
15+
.option('-p, --port <number>', "Port", parseInt)
1616
.parse(process.argv)
1717

1818
var PORT = program.port || process.env.PORT || 3000;
@@ -93,15 +93,15 @@ app.get('/', function(req, res) {
9393
});
9494
});
9595

96-
server.listen(PORT,function(err){
97-
console.log('Listening to port '+PORT);
96+
server.listen(PORT, function(err) {
97+
console.log('Listening to port ' + PORT);
9898
console.log('Enter "ifconfig" or "ip addr" from terminal to find your ip address');
9999
});
100100

101-
process.on('uncaughtException',function(err){
102-
if(err.syscall=='listen'){
101+
process.on('uncaughtException', function(err) {
102+
if (err.syscall == 'listen') {
103103
console.log('Unable to start Server: Please try changing the port or run with superuser privilages')
104-
}else{
104+
} else {
105105
console.log("Unknown Error")
106106
}
107-
});
107+
});

src/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Jayadeep KM",
33
"name": "Wshare",
44
"description": "A simple tool to share files to your computer via ethernet/wlan",
5-
"version": "0.0.1",
5+
"version": "0.0.2",
66
"homepage": "",
77
"repository": {
88
"type": "git",
@@ -17,7 +17,8 @@
1717
"fileshare",
1818
"sharing",
1919
"file share",
20-
"lan"
20+
"lan",
21+
"wshare"
2122
],
2223
"bin": {
2324
"wshare": "./bin/wshare"

0 commit comments

Comments
 (0)