I have looked at Google Cloud Run, Microsoft Azure and Kamatera so far. These are free trials, and I deleted and removed all projects after playing with them.

I am working on a chatting application for my portfolio. I’m using MERN to create the app and I can run it locally and connect to the local server with any device on the network. Before I got into this I didn’t realize setting up a cloud server was going to be so confusing, and that’s after trying to watch tutorials on youtube and going through documentation.

On google, people have talked about VM Instances, (Bare Metal Solution?) Servers, networks, VPC’s, VPC Networks, serverless VPC, etc. and I have explored all of these things and I just don’t understand why it’s so hard to get a node.js file running somewhere remote.

Microsoft Azure and Kamatera were pretty much the same experience.

I’m not the smartest or faster person, I’ve got cognitive issues, but if anyone can kind of give me some simple steps or explanations to get me started in the right direction, I’d really appreciate it.

I don’t need a complete write-up or guide, just a push in the right direction for my specific project, which is just getting my node.js code somewhere so the client can connect to through it. I think?

  •  David   ( @s3rvant@beehaw.org ) 
    link
    fedilink
    English
    21 year ago

    If you’re comfortable working on a local VM then perhaps a VPS such as Linode or Digital Ocean would be a good place to start; they’re essentially VMs hosted in cloud you have total control of so you can install whatever you want just like a local VM. Even the cheapest VPS option is plenty for this sort of testing.

    These have free trials too such as: https://www.linode.com/tux

    • I’ll look into this, thank you! I didn’t look at a vps (I had to Google what vps meant) but I’ll check it out!

      I kept pushing with azure and I got pretty far with it, but I hit a snag when running az webapp up because I kept getting errors stating my app name already existed, or Id get a “forbidden” error if my app name was too unique

      •  David   ( @s3rvant@beehaw.org ) 
        link
        fedilink
        English
        21 year ago

        Yeah, bigger solutions like Azure, AWS, etc. have some cool features especially for scaling but… that comes with its own headaches.

        For earlier stages I personally much prefer a simple VPS where I can freely do what I want with it including total wipes, snapshots / rollbacks, etc.

  • It’s not that it’s hard to get node code running on a remote server per se, it’s that there’s a lot of decisions to make and finicky details related to the “non-functional” parts of serving an app over the internet: getting traffic to the app, configuring multiple copies of the app, storing state, the developer experience of shipping your app from laptop to production, secrets management, etc. By and large, the differentiator of most cloud providers and “platforms as a service” is in how they approach handling those details, and there’s usually a spectrum of configurability and convenience. In general, as you add options to configure, you get less convenient, but more easily able to address more use cases.

    In general, I recommend new developers target the thing that’s most convenient, which usually means the thing with the fewest configuration options. For node apps, my go to recommendations right now are Glitch and Railway. I’ve also heard good things about Render, and Fly, but I haven’t used either personally, so can’t speak to either. Generally though, I think you’ll have an easier time looking for a platform as a service instead of targeting a cloud provider directly.

  • Look at “ngrok”. It’s one command, and gives you a publicly accessible address+port that forwards to your locally running service. The code is still running on your machine, but all the networking problems are handled for you.

    If you want to leave it running all the time, google cloud and oracle cloud both offer free, albeit small, virtual machines. You can use ngrok there too.

    From there, any cloud provider should be able to attach a public ip address to your virtual machine. Azure and Aws are the easiest here.

    I recommend a virtual machine because it will be very similar to how you run your code right now. I would not use anything “serverless”, like azure functions, because there is a lot going on under the hood that you should understand first, so that you can solve problems easily.

    That being said, google cloud run can be straightforward, but only if you stay “on the sidewalk” if you know what I mean.

    • I’m going through the thread now and this was the first thing I saw this morning, this sounds very interesting and newbie friendly, I’ll definitely look at this if I can’t get this linode issue fixed where I can’t login because my password is incorrect

      Edit: I had to make a server two more times on linode. I tried “Rescuing” to reset the password many time on these two with no luck. but the third time my password is letting me log in. But I’m still interested in your ngrok suggestion.