TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Post-Jamstack Era: Just Use Rails

38 点作者 multiplegeorges8 个月前

7 条评论

horsawlarway8 个月前
This is addressing all the things I don&#x27;t care about at all for a static site, and then suggesting a tool that makes very little sense.<p>If you&#x27;re hosting a static site... life is easy. Throw your content in any s3 compatible storage and point a CDN at it. Done. It will cost literal pennies a year (The domain name will be <i>by far</i> the most expensive piece, and lots of places will give that to you for free if you don&#x27;t care about being a subdomain).<p>That too complicated for you? Host it on a raspberry pi out of your bedroom. For the vast majority of traffic loads... that thing is going to be A-OK, even on a crappy consumer line (You&#x27;ll probably be violating your TOS with your provider if it&#x27;s a commercial site... but I&#x27;ve found they really don&#x27;t seem to care unless you&#x27;re causing them headaches, and a static site ain&#x27;t gonna cause many headaches).<p>That too complicated for you? 10 lines of js with express will stand up a prefectly functional static site. Or you literally just install nginx and configure a single server block.<p>Static sites are <i>fucking easy</i>. It is ridiculously easy to serve static content these days. And borderline free (again - the domain name is going to DWARF the rest of your costs combined, even if you&#x27;re only paying 5 bucks for the name).<p>How do you generate your static content? Who cares - do whatever feels best to you (I personally think rails is a bonkers solution, but if you want to use rake tasks to create your output... more power to ya?)<p>It <i>really</i> sounds like the author doesn&#x27;t understand what a static site is, because JAMstack also isn&#x27;t a static site solution (It has API right there in the name).<p>If you need to be consuming APIs with changing data... you aren&#x27;t a static site (even if the html&#x2F;js&#x2F;css you serve happens to be static). In which case... rails is a fine choice, but if you&#x27;re <i>only</i> serving the html&#x2F;js&#x2F;css and hitting 3rd party apis... I would still recommend an s3 bucket with a CDN.
评论 #41549940 未加载
评论 #41588551 未加载
Alifatisk8 个月前
If you are going to create a static site, do not use Rails, use jekyll or something similar, they are built for this.
xet78 个月前
For static websites, I use GitHub Pages (or GitHub wiki), and for some of those websites custom domain. I edit websites static HTML&#x2F;CSS locally, commit and push, or edit at GitHub website.<p>Installing Rails means installing very many Gem packages. That is just too much.
Terretta8 个月前
Over two decades ago, folks did this using web server paths with index.html prioritized over e.g. index.php or index.cfml or whatever.<p>When you&#x27;d build the page dynamically, you&#x27;d also write a static .html before serving the html to the visitor. From then on, the .html got served.<p>On a new build, you&#x27;d rm the .htmls.<p>Back at the time, it seemed to be &quot;the simplest thing that could possibly work&quot; for multiplying a server&#x27;s traffic capacity by 10000.
langsoul-com8 个月前
If the author truly is using nextjs just for static, then it should be a simple compile and host the output folder?<p>Strange to say use rails for static, but the author argues how server less is a nightmare. Though, I also think the same, use nextjs just for the react frontend and a proper backend.
nsonha8 个月前
did the author forget the age of mobile phones? You need an API anyway.
nprateem8 个月前
This post has successfully convinced me this company is full of retards. Great job.<p>Just use hugo&#x2F;whatever and host on s3. This shouldn&#x27;t even be a debate, let alone they&#x27;ve already done 3 rewrites. Bunch of clowns.