from Hacker News

Ask HN: What language/framework is easiest to deploy?

by vmsp on 3/24/22, 4:43 PM with 11 comments

Rails, Django and Laravel usually take the cake on productivity. But they're not particularly easy to deploy.

If you were optimizing for deployment speed, what would you use? Install PHP and FTP files to the server? Install Docker and containerize your app?

  • by onion2k on 3/24/22, 5:15 PM

    I feel like these days your deployment should be as hands-off as possible. A merge to the main branch should pick up the changes, run the build process, do any necessary migrations, and push the app container to a server somewhere. Once you've got it working you can deploy as often as you like and (hopefully!) everything just works.

    As such it shouldn't really matter what you're deploying, or even how long it takes. You merge and forget about it, and a few minutes later users are using the latest version. It doesn't matter if that's 3 minutes or 15 minutes because you can just carry on working happy in the knowledge that it's taking care of itself.

  • by kipple on 3/24/22, 8:59 PM

    For web apps: TypeScript with Next.js & Vercel

    Next.js takes care of your full-stack web app (client routing, server APIs, the fuzzy world of SSR/SSG/ISR) plus your whole dev/prod build (zero-config React & TypeScript, minimal config ESLint & Prettier)

    And Vercel deploys it as easily as `npx vercel --prod`, or just hooking your GitHub repo up to the project through their web UI so it deploys on push. Their integration will even show the deployment status for each commit, from within GitHub.

    It's a delightfully streamlined process, and a suite of tools that all have large communities and rich ecosystems.

  • by jjice on 3/24/22, 5:34 PM

    Anything that can statically link and compile to native is super easy to deploy in my experience.

    Go and Rust have been really easy in my experience. Needing a runtime installed, and making sure it's the right version usually isn't a big deal, but once and a while it can be a pain. I thankfully haven't had issues with linking to things like libc via Rust.

    In the same vein, Docker is a real hero in my experience with deployments. Get it working locally and we're almost always good to go. You'll need Docker installed, but that's pretty easy to guarantee in most environments. Also, almost all PaaS that I see these days support Docker out of the box, which is awesome to see.

  • by toast0 on 3/24/22, 11:08 PM

    For maximum deployment speed, you need hotloading ala Erlang/BEAM or something like PHP that (by default) checks the disk every request and reprocess the code.

    If you've got many servers and you really want fast deployment, you'll also need something to distribute your updates as fast as possible; although a not-instant rollout does give the benefit of being able to stop some bad pushes in progress, before it breaks the world; although there's certainly those releases where having non-zero new and non-zero old guarantees breakage for both.

  • by BjoernKW on 3/24/22, 9:09 PM

    Java (and Spring Boot, specifically). JAR files were containers before there were containers.

    Deploying a Java application and its entire dependencies is as easy as uploading a JAR file. Everything else (ideally) will be taken care of by the runtime environment.

  • by emteycz on 3/24/22, 5:02 PM

    PHP is the easiest to deploy, for sure - just buy a classic webhosting for $2/month.

    But I'd not optimize on deployment ease. I'd go with Node.js, TypeScript (or your preferred stack) and Dockerize it for development ease.

  • by mathgladiator on 3/25/22, 2:14 AM

    I use Java and just scp a jar over followed up by a ssh to restart via systemd.
  • by crate_barre on 3/24/22, 9:03 PM

    Learn just a little bit of nginx and you should be fine with anything.
  • by yuppie_scum on 3/24/22, 4:53 PM

    Python