简单的 Sinatra 作品集网站

发布于 2024-10-09 06:24:38 字数 277 浏览 0 评论 0原文

基本上,我只是想问如何在 Sinatra 中制作一个简单的网站。

但如果可能的话;

  1. 它需要对单个管理员进行简单的身份验证。

  2. 简而言之,管理员设置主页上的内容,例如内容是什么。

  3. 内容基本上是从管理页面通过管道传输的,因此不需要数据库,如果不可能,那么什么 ORM 让我立即启动并运行?

另外,我计划将其托管在 Heroku 上,我会遇到什么限制?

谢谢,提前抽出时间。

Basically, I just want to ask how to approach making a simple site in Sinatra.

But if possible;

  1. It needs a simple authentication for a single admin.

  2. In a nutshell, the admin sets what's on the main page, like what's the content.

  3. The content is basically piped from the admin page, so no database is needed, if it's not possible then what ORM gets me up and running immediately?

Also, I'm planning to host it on Heroku, what limitation will I encounter?

Thanks, beforehand for the time spared.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

So尛奶瓶 2024-10-16 06:24:38

开始于:

require 'sinatra'

get '/admin/login' do
  # login
end

走吧!

我会为您的 ORM 尝试 Sequel

您需要一个地方来存储您的数据。您不能只是从另一个页面“管道”它。

Start with:

require 'sinatra'

get '/admin/login' do
  # login
end

And go!

I would try Sequel for your ORM.

You need a place to store your data. You cannot just "pipe" it from another page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文