Permalink
Browse files

Step 8. Heroku deploy

  • Loading branch information...
alexeybondarenko committed Aug 6, 2017
1 parent 02cfc6e commit 64812199c818d4c494c0ade05a40720cdfe9a386
Showing with 4 additions and 3 deletions.
  1. +1 −1 client/app.js
  2. +3 −2 server/index.js
@@ -18,7 +18,7 @@
}
// WEBSOCKETS
var client = new BinaryClient('ws://' + location.hostname + ':3001');
var client = new BinaryClient(location.origin.replace('http', 'ws').replace('https', 'ws') + '/socket');
var MIDIStream = null;
client.on('open', function () {
@@ -18,7 +18,7 @@ app.get('/', (request, response) => {
response.render('index');
});
app.listen(app.get('PORT'), (error) => {
const server = app.listen(app.get('PORT'), (error) => {
if (error) {
console.log('Server started with an error', error);
process.exit(1);
@@ -27,7 +27,8 @@ app.listen(app.get('PORT'), (error) => {
});
const socket = new binaryServer({
port: 3001,
server: server,
path: '/socket',
});
function playTone(tone, stream) {

0 comments on commit 6481219

Please sign in to comment.