Commit 594a06f0ee2c27f8b4228cb6e86d62feff43c2b0
1 parent
7fa44e84
debug host
Showing
3 changed files
with
4 additions
and
4 deletions
server/app.js
| ... | ... | @@ -3,7 +3,7 @@ var app = express(); |
| 3 | 3 | var http = require('http').Server(app); |
| 4 | 4 | var io = require('socket.io')(http); |
| 5 | 5 | var nsp = io.of('/my-namespace'); |
| 6 | -var port = process.env.PORT || 3306; | |
| 6 | +var port = process.env.PORT || 5000; | |
| 7 | 7 | var path = require('path'); |
| 8 | 8 | |
| 9 | 9 | var content; |
| ... | ... | @@ -63,5 +63,5 @@ io.on('connection', function(socket) { |
| 63 | 63 | |
| 64 | 64 | |
| 65 | 65 | http.listen(port, function() { |
| 66 | - console.log('listening on *:' + port); | |
| 66 | + console.log('listening on --------:' + port); | |
| 67 | 67 | }); | ... | ... |
src/live/js/student.js
| 1 | 1 | $(function() { |
| 2 | 2 | var teacherId = document.getElementById('teacher'); |
| 3 | 3 | var studentId = document.getElementById('student'); |
| 4 | - var socket = io('http://127.0.0.1:3306'); | |
| 4 | + var socket = io('http://live-api.com:5000'); | |
| 5 | 5 | |
| 6 | 6 | var teacher = CodeMirror.fromTextArea(teacherId, { |
| 7 | 7 | value: '输入HTML代码', | ... | ... |
src/live/js/teacher.js