I am working over gcloud, I use nodejs and socketIO, I am working with simple socket networking, connection, disconnect and ping.
Everything is working great over my local linux machine.
When I deploy to gcloud, it doesn't work. I got disconnection once I connect to the server from the client.
I use port 8080|| process.env.PORT
What's wrong with that.
How can I get it working over gcloud.
Thanks.
Related
I have a basic react app which makes a call to an express server. In my localhost i can run the server with the command nodemon server.js and then my react app successfully makes calls to the server (which sends emails, it all works fine)
The issues is i must run the server everytime i want to let my app contact my server, but when i will deploy my app to my web hosting, the client using the website cannot run the server, needless to say. So my question is what can i do to resolve this?
I've just started backend dev so go easy please. thanks
You will have to find a place to host your Node.js backend. There the service will continuously run and will be accessible from the internet. You could either rent a server or go with a serverless approach (like Netlify or countless other providers).
I have rabbitMQ running as a VM inside a Google Cloud Project. In that same project I have a NodeJS app running in which I am trying to connect to rabbitMQ.
I keep getting the error:
[AMQP] connect ETIMEDOUT ip:port
I think its because in the firewall settings there is specified an allowed IP Range of 0.0.0.0/0.
How would I specify that my NodeJS App is also allowed access?
I have also allowed tcp protocoll on the relevant ports.
So the reason I wasnt able to connect was because I hadn't even deployed the GAE App, rather I tested it with a simple npm start inside of the Google Cloud Shell. As soon as I deployed and connected to the rabbitMQ instance over its internal IP it worked like a charm.
I deployed a GAE Flexible App built on SpringBoot successfully on GAE Flex environment but if I set the app to run on port 8090, sending a request to the App gives a 502(Bad Gateway). Setting the port to 8080 responds to the requests successfully.
I specified Port Forwarding in the Firewall rule which seems to be useless.
So the question is,
Why does my GAE Flexible App responds to HTTP requests on port 8080 automatically?
And,
Is there no way to use any other port for my Application?
I implemented websocket transport with latest (1.3.5) Socket.IO, using node.js as a backend.
Handshake and data exchange works well in the latest desktop browsers. But Safari on 8.1.2 iOS and 38 Chrome on Android couldn't connect to server over WiFi. Do anybody faced the same problem or know what's wrong here?
These screenshots show that you're trying to connect to localhost. If you're on a mobile device, localhost is the mobile device itself, not your node.js server. You will need to use the IP address or DNS name of your server, connect to that instead and you will need to make sure your WiFi network has access to the node.js server.
Background
Before dotCloud decides to shut down its free sandbox service, I used it as sort of a reverse proxy to reroute all requests to a particular domain, to a local server of mine in which I'm hosting a Mono based application (.NET 3.5 web app running on a Cent-OS Linux). Essentially, the domain forwarded the requests to my dotCloud app and the app, through SSH, to my local server.
Question
I wonder if similar setup is possible with Google App Engine. Any help is appreciated.
More Information
I got the idea from here. My dotCloud app is nothing but a Nginx configuration file that forwards all http(s) requests to a SSH port that was bound to a local port (which I configured for my web server to use).
As for my motive, well, I bought a host service with PHP stack and later on decided not to use PHP. So in order to avoid another purchase I used dotCloud.