Reputation: 263
I want to deploy Nodejs websocket application on Google App Engine (GAE), I have tried for the past 3 days with no success
I keep getting the error ERR_CONNECTION_TIMED_OUT
this is my app.js file in Nodejs
var WebSocketServer = require('ws').Server,
wss = new WebSocketServer({ port: 65080 }),
CLIENTS = [];
console.log('WS listening on port 65080');
// on new connection
wss.on('connection', function (ws) {
console.log('incoming connection ....');
ws.id = uuid.v4();
CLIENTS.push(ws);
ws.send('{"type":"uuid","value":"' + ws.id + '"}');
});
I have opened firewall port successfully , like this
and this is my app.yaml
runtime: nodejs
env: flex
api_version: 1
service: websockets
manual_scaling:
instances: 1
network:
forwarded_ports:
- 65080
session_affinity: true
instance_tag: websocket
any advice is appreciated..
Upvotes: 1
Views: 493
Reputation: 2357
See this comment on Google public issue tracker:
It seems Web-sockets aren't available for GOOGLE APP ENGINE flexible yet. I recommend you to star the issue so you can follow the updates.
Upvotes: 1