where to deploy a web2py app that uses websockets? - websocket

I asked this question and it seems pythonanywhere doesn't support websockets.
pythonanywhere - How do I use websockets to transmit messages as per the web2py messaging example?
so the question is where could I deploy the app as effortlessly as possible?
right now when I run it locally its as easy as
python web2py.py &
python websocket_messaging.py -p 8888 -k mykey

It's not going to be as easy as pythonanywhere, but you could deploy to any VPS, such as Digital Ocean. To make things easier, use one of the web2py deployment scripts, such as https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh. Once you have the basic server set up, you'll still need to install Tornado and follow the other instructions for using websocket_messaging.py.

Related

Websockets with NextJS in Heroku

Is it possible to use websockets with NextJS in Heroku?
I have a web app deployed in Vercel. Vercel does not support websockets. They recommend to use a third-party service. The problem is that this service doesn't work properly. I've implemented it already without getting the desired result. Doing some research I found out that the nature of Vercel makes it difficult to implement websockets.
Some people recommend to use Heroku. Heroku supports websockets. But it's not clear to me if I deploy my NextJS project on Heroku I'll be able to implement websockets out of the box. Or do I have to port my project to a different technology like ExpressJS.

Make netty server on localhost accesable over internet

I have developed a Jooby-Application which is hosted on a netty server. I can access the application on localhost and tests were fine. Now I want to make the app accessable over internet and dont know what is the best way to reach this goal?
The complete application is hosted on a Windows Server, because it uses Excel. (Read/Write over Apache POI. For macros it has to be Windows) Should I try to connect the running netty-server with IIS or can I just forward the requests from outside to localhost? The last mentioned approach propably is a bad idea regarding security issues.
It works with reverse proxy over IIS. I had to install some features like Application Request Routing and URL Rewrite. Then I can start the jooby application (netty server) as usual on a specific port at localhost and set a reverse proxy to it.
I am not sure why being on a window is necessary, anyways, Netty is just a Java network programming framework, it can run on any platform where Java is installed.
You need to host a server, you can buy a VPS, install windows as OS, install Java, you can run your application as you like.
What I understand is you need to test it, for that you can use any port forwarding service like https://pagekite.net/support/intro/features/ to enable "world access" to localhost

How do I host an app created with Polymer?

I've been Googling this problem for some weeks now and can't find a solution to what seems to be a simple problem. It seems to get pretty convoluted pretty quickly.
I've read through the node.js Heroku getting started and a lot of other tutorials but it seems to be that it won't work with Polymer. I can see my app looks and works fine when I run python -m http.server 8000 from the command line in my directory I can view my app in the localhost and it looks great!
If anyone has any clue as to where I should go from here or can point me to any useful links that would be amazing! Even better if there is some kind of skeleton Polymer website that is freely available.
If you aren't trying to host a node.js or other backend with your polymer app you can use github pages. https://pages.github.com/
Polymer app is essentially only files that the browser needs to retrieve from remote server. You don't need to have backend on the host server. If you were trying to host node.js or other backend you could use heroku to host it.

How do I go about setting up my Sinatra REST API on a server?

I'm an iOS developer primarily. In building my current app, I needed a server that would have a REST API with a couple of GET requests. I spent a little time learning Ruby, and landed on using Sinatra, a simple web framework. I can run my server script, and access it from a browser at localhost:4567, with a request then being localhost:4567/hello, as an example.
Here's where I feel out of my depth. I setup an Ubuntu droplet at DigitalOcean, and felt my way around to setting up all necessary tools via command line, until I could again run my server, now on this droplet.
The problem then is that I couldn't then access my server via droplet.ip.address:4567, and a bit of research lead me to discovering I need Passenger and an Apache HTTP Server to be setup, and not with simple instructions.
I'm way in over my head here, and I don't feel comfortable. There must be a better way for me to take my small group of ruby files and run this on a server, than me doing this. But I have no idea what I'm doing.
Any help or advice would be greatly appreciated.
bit of research lead me to discovering I need Passenger and an Apache HTTP Server to be setup, and not with simple instructions.
Ignore that for now. Take baby steps first. You should be able to run your Sinatra app from the command line on the DigitalOcean droplet, and then access it via droplet.ip.address:4567. If that doesn't work something very fundamental is wrong.
When you start your app, you will see what address and port the app is listening on. Make sure it's 0.0.0.0 and 4567. If it's 127.0.0.1 or localhost that means it will only service requests originating from the same machine
After you get this working, next step is to make your Sinatra app into a service. Essentially this means the app runs in the background, and auto-starts when the system reboots. Look into Supervisor which is very simple configuration to get this running.
Later you can install Apache or Nginx to put in front of your Sinatra app. These are proxies which simply forward requests from port 80 (default HTTP port) to your sinatra app, but can do additional things such as add SSL support, load balancing, custom error pages etc. - all of which you do not need right now.

Can I host a RAP application (Rich Ajax Platform) in Heroku?

I'm thinking of creating an application (RAP). I would like to know if I can host in Heroku or if you know a hosting provider that offers this service.
You can host anything that can run on Linux as long as you're not having to persist anything on the filesystem and you have a buildpack which suits your needs.
Once those are in place, the world is your oyster.

Resources