hi ,
I want deploy feathers to GAE Fixble ( google app engine )
Unfortunately, the loadbalancer of Google App Engine doesn't support websockets.
so , I need set socket.io listen port different with rest api ( 80 , 443 )
Is possible setting different port for sokect.io ?
thanks .
You should be able to start the REST part like this:
const http = require('http');
http.createServer(app).listen(80);
And then the socket server via:
const socketServer = http.createServer().listen(3889);
app.setup(socketServer);
Do not call app.listen
.
thanks for your help , even I have some static ip to handle with socket .
but I have a first step with deploy on GAE flexible .
this is my current index.js
'use strict';
const http = require('http');
const app = require('./app');
const port = process.env.PORT || app.get('port');
const socketServer = http.createServer().listen(3889);
app.setup(socketServer);
const server = http.createServer(app).listen(port);
// app.listen(port);
server.on('listening', () =>
console.log(`Feathers application started on ${app.get('host')}:${port}`)
);
now I can deployed to GAE , I can call restful use http://my-app.appspot.com , call ws with ws://ip-address:3889
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.
Most helpful comment
You should be able to start the REST part like this:
And then the socket server via:
Do not call
app.listen
.