Reputation: 3945
I developed two rails apps, they will each go on site.com
and something.site.com
respectively. In development mode they are run on localhost:3000
and localhost:4000
, you must be logged into site.com
to access something.site.com
.
I have the cookies set up to handle domains from :all
, and the tests all pass in relation to creating and destroying sessions. How ever I am unfamiliar how to test the cookies with out actually deploying the apps to production. I don't have staging servers, their small basic apps and I don't want them public. Is their any ways, on my mac, I can test (by launching both apps) the domain specific cookies?
Upvotes: 0
Views: 929
Reputation: 1006
Look at using POW and Powder. Runs slower, but allows you to run concurrent apps on localhost.
Upvotes: 0
Reputation: 2795
I bet you could update your hosts file to point something.localhost to 127.0.0.1
127.0.0.1 something.localhost
in `/etc/hosts
I'm sure you've read that as long as the TLD is the same, this should work.
Upvotes: 0
Reputation: 4982
You can edit your hosts file located at /etc/hosts
to point 127.0.0.1 to local.site.com and then access your rails apps at local.site.com:3000 and local.site.com:4000
127.0.0.1 localhost local.site.com
Upvotes: 1