简体   繁体   English

Heroku,域名

[英]Heroku, Domain Name

Quick noob question or two about Heroku. 关于Heroku的一两个快速noob问题。

I have a rails app I would like to deploy on Heroku. 我有一个想在Heroku上部署的Rails应用程序。

If I want the address to be www.whatevername.ie do I need to purchase this domain name or does the custom domain name feature with Heroku allow me to do this? 如果我希望该地址为www.whatevername.ie,我是否需要购买此域名,或者Heroku的自定义域名功能允许我这样做?

Secondly, what is the difference between development and production with regards to deploying an app on Heroku? 其次,在Heroku上部署应用程序方面,开发和生产之间有什么区别? Once it's deployed and on the net, does this mean it is in fact "in production" so to speak? 一旦部署并在网络上,这是否意味着它实际上处于“生产中”状态?

Thanks! 谢谢!

If I want the address to be www.whatevername.ie do I need to purchase this domain name or does the custom domain name feature with Heroku allow me to do this? 如果我希望该地址为www.whatevername.ie,我是否需要购买此域名,或者Heroku的自定义域名功能允许我这样做?

You need to purchase the domain name. 您需要购买域名。

- --

Secondly, what is the difference between development and production with regards to deploying an app on Heroku? 其次,在Heroku上部署应用程序方面,开发和生产之间有什么区别? Once it's deployed and on the net, does this mean it is in fact "in production" so to speak? 一旦部署并在网络上,这是否意味着它实际上处于“生产中”状态?

Development is what's on your computer locally; 开发就是本地计算机上的内容。 production is what's on the internet for all to see (in this case, on Heroku). 生产就是所有人都可以看到的互联网(在这种情况下,就是在Heroku上)。

Heroku Heroku

To answer your questions more fully, you need to appreciate that Heroku is a Platform As A Service - meaning that it will provide the back-end infrastructure for your application, but that's it: 为了更全面地回答您的问题,您需要了解Heroku是一种Platform As A ServicePlatform As A Service -意味着它将为您的应用程序提供后端基础结构,仅此而已:

在此处输入图片说明

In terms of a domain name, it's not for Heroku to buy you a domain . 就域名而言,Heroku并不是要您购买域名 A domain is literally just a "mask" for an IP address (a shop window), which means you have to buy it (as the DNS system takes a lot to manage & maintain) 域实际上只是IP地址(商店橱窗)的“掩码”,这意味着您必须购买它(因为DNS系统需要大量的管理和维护工作)

Heroku's custom domain feature is simply a means for you to accommodate external domain name traffic to your application. Heroku的自定义域功能只是您为应用程序提供外部域名流量的一种方法。 You'll have to buy a domain (we use Namecheap, but there are 1,000's of domain registrars you can use) 您必须购买一个域名(我们使用Namecheap,但是您可以使用1,000个域名注册商)

-- -

Rails 滑轨

If you want to run a Rails application, the development and production environments are very important, although not much different than each other. 如果要运行Rails应用程序,则developmentproduction环境非常重要,尽管彼此之间没有太大区别。

As mentioned in the referenced question, the underlying differences between "production" and "development" modes / environments for Rails is efficiency. 如所提到的问题中所述,Rails的“生产”和“开发”模式/环境之间的根本区别是效率。 You're running the SAME source code in both environments - the difference is how that source is handled, compiled & served 您在两种环境中都运行SAME源代码 -区别在于如何处理,编译和提供该源代码

-- -

Development 发展历程

  • Rails logger is running all the time Rails记录器一直在运行
  • Exceptions are captured & displayed on screen 捕获异常并显示在屏幕上
  • Classes are not cached 不缓存类
  • Assets are compiled "on the fly" (dynamically handled) 资产“动态”编译(动态处理)
  • Typically operated with low-efficiency services (DB / Web Server) 通常与低效率服务一起运行(数据库/ Web服务器)
  • Loads everything individually for development purposes 出于开发目的单独加载所有内容

Production 生产

  • "Assets" precompiled & served statically (for performance) “资产”已预编译并静态投放(以提高性能)
  • Classes can be cached 可以缓存类
  • Production-grade web & DB servers recommended 推荐生产级Web和DB服务器
  • Focus on efficiency & speed 专注于效率和速度

-- -

By default, Heroku will run your Rails application in production mode 默认情况下,Heroku将在production模式下运行您的Rails应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM