0
AlgoRythm
177d

Looking for hosting recommendation.

I want to set up a very simple, damn near static Node.JS site that uses handlebars and some custom routing logic (static site wouldn't cut it).

No database connection, nothing serverside except handlebars and Node.js.

I want HTTPS and to use my own domain.

Can anything accomplish this for less than a $5/mo droplet from digitalocean?

Comments
  • 1
    crocweb

    And they won't rip you off like a lot of the hosts now. Domain get from namesilo.com.

    crocweb has https support. I do about $10 a month for my stuff. But I have seen plans for $3 or around there.
  • 1
    Pretty sure they have node.js support too. Lots of options.
  • 1
    Don't use it personally but I tried it once, Heroku was easier to set up than DO. You can go for an eco dyno (5$) or a basic (7$ which includes SSL & cert-renewal & maybe domain? Dunno). They support deploys from git & take care of OS patches
  • 3
    If there's really nothing on the server side, are you sure you couldn't render it to a static site and deploy to github pages? I take pleasure in devising strange SSG setups. My mom's website is a custom JS site generator, mine is a React site but it simultaneously lazy-loads the JS for hydration and uses Puppeteer for prerendering so it manages to be about as difficult as they get.
  • 0
    I'll host you but you'll have to share with Chlamydia and her friends
  • 0
    @lorentz Unfortunately I would really love to do this but cannot because, unless the GitHub routing can be configured this way, I need any path which doesn't exist in the static resources folder to route to the index page. It's SPA so routing is done client-side.

    I've already considered GH pages but this was the snag that made me know I needed at least a little server side support
  • 1
    @MammaNeedHummus Herpes and gonorrhea?
  • 0
    @AlgoRythm I mean, you can redirect client-side in 404.html
  • 0
    @lorentz I need it to retain the path
  • 0
    Hetzner’s arm vps is around $3 for damn good specs
  • 0
    @AlgoRythm Then you can have a copy of index.html as 404.html and render the 404 page with client-side routing. In fact, if you have a finite number of routes you can write index.html to each of them.
  • 0
    @AlgoRythm That's one step less advanced than SSG, where you would prepopulate each of those HTML files with the contents after rendering, and have your SPA framework hydrate it. That's how my website works.
  • 0
    @lorentz hmmm, in fact, why have an index whatsoever? If I can have everything redirect to 404.html, that's exactly what I need... Hmm... And I guess I don't *need* the personal domain, I can use GitHub's default or whatever. Unless I can configure my domain on GH pages
  • 0
    @AlgoRythm You can have search engines index your content by prerendering each page. Also, all redirects are "virtual" JS redirects which means that the network and parsing components of navigation delay double, so you probably want to do it as little as possible even if you don't care about search engines or accessibility. Anyway in an SPA the largest part is the main JS bundle and that can be imported to each HTML file from a shared location.
  • 0
    @AlgoRythm You can't have *everything* redirect to 404.html, you can prepare specific HTML files with whatever you like, everything else will return a 404 status code alongside the contents of 404.html
  • 0
    Actually, a quick search reveals that deploying SPAs on github pages by placing the main HTML file in 404.html is extremely common, so you can just do that I guess if search engine indexing isn't important.
  • 0
    @lorentz Yeah I'm already working on that. I don't care about SEO, just need the host
  • 1
    @lorentz Well waddaya know, what a neat little hack. It completely works. All I had to do was make a little "build" script and that was all. How wonderful, free hosting!
Add Comment