Posted 13 days ago. Visible to the public. Linked content. Auto-destruct in 47 days

Updated: Advantages of using appname.vcap.me:3000 over localhost:3000

Changes

  • Running `rails server` will start a local server that you can access via `http://localhost:3000`.
  • -When you are working on multiple web apps, they will likely cookies with generic names on `localhost`. This is annoying, since you will sign out your current user whenever you switch to another app.
  • +When you are working on multiple web apps, they will likely set cookies with generic names on `localhost`. This is annoying, since you will sign out your current user whenever you switch to another app.
  • A better way is to use the vcap.me service. All vcap.me subdomains resolve to your local IP (127.0.0.1). That means you can use a different hostname for different apps, and you will stay logged in in each app:
  • ```text
  • http://foo-app.vcap.me:3000 => 127.0.0.1
  • http://bar-app.vcap.me:3000 => 127.0.0.1
  • http://bam-app.vcap.me:3000 => 127.0.0.1
  • ```
  • +
  • +> [CAUTION]
  • +> `vcap.me` is simply an external domain that resolves to `127.0.0.1`. At the time of writing this note it stopped working. Do not hard-code this domain into 100 different config settings. Instead, define it in a single place so switching it out will be easy.
  • +
  • +> [NOTE]
  • +> Alternative loopback domains: [https://www.david-tec.com/2013/07/Never-edit-your-hosts-file-again-when-working-on-localhost/](https://www.david-tec.com/2013/07/Never-edit-your-hosts-file-again-when-working-on-localhost/)

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).

Owner of this card:

Avatar
Klaus Weidinger
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Klaus Weidinger to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more