gitpush
This commit is contained in:
parent
0f4f8bc709
commit
c5758cafd8
@ -22,8 +22,7 @@ const server = http.createServer(function (request, response) {
|
|||||||
})
|
})
|
||||||
server.listen(port, host, () => console.log(`rpi status http server is running at http://${host}:${port}`))
|
server.listen(port, host, () => console.log(`rpi status http server is running at http://${host}:${port}`))
|
||||||
|
|
||||||
const socketio = require('socket.io')
|
const io = require('socket.io')(server, { cors: { origin: "*" } })
|
||||||
const io = socketio(server, { cors: { origin: "*" } })
|
|
||||||
setInterval(() => { update_status() }, 1000)
|
setInterval(() => { update_status() }, 1000)
|
||||||
function update_status() {
|
function update_status() {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user