sails.js

Sails.js redirects to example.com on production


In dev mode everything works great, but when on production mode, somehow sails redirects me to https://example.com

Not sure, why. Any ideas?

Server console, and user redirect snapshots


Solution

  • You need to change the baseUrl in config/env/production.js from example.com to localhost:1337. When running in production mode, these settings are applied to the sails server.