-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from chiragrank/exp1_v2
Add aws worker id data collection and getting socket url from the node server
- Loading branch information
Showing
6 changed files
with
53 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
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
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,12 +1,18 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
const express = require('express'); | ||
const path = require('path'); | ||
const app = express(); | ||
var public = path.join(__dirname, '/public'); | ||
app.use('/', express.static(public)); | ||
app.get('/', function(req, res) { | ||
res.sendFile(path.join(public , 'index.html')); | ||
}); | ||
|
||
app.listen(process.env.PORT, process.env.IP, function(){ | ||
console.log("Server has started"); | ||
app.get('/data', function(req, res){ | ||
console.log('data route called'); | ||
res.json({ "socketURL": process.env.LOCAL_SOCKET_URL }); | ||
}); | ||
|
||
console.log("Server Address: "+ process.env.IP+ "/"+process.env.PORT) | ||
app.listen(process.env.PORT, process.env.IP, function() { | ||
console.log("Server has started" ) | ||
}); |