Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 3
    How would you put everything onto one domain if they're two separate servers? Even if they ran on the same host, they'd have to be on different ports, making them different origins. Commented Dec 27, 2015 at 15:35
  • 1
    If there's not a best practice, are there available examples on how this configuration is done? Commented Dec 27, 2015 at 15:36
  • 7
    You can put a reverse proxy (nginx) in front of your application and mount / location to localhost:3000 (frontend server) and /api/ to localhost:3001 (api server). nginx will listen to default http port then. Commented Dec 27, 2015 at 16:10
  • @nvartolomei I agree with using reverse proxy. Is there a way to cleanly share some information between backend, front end, like routes information? Also, is it easy to point your reverse proxy to a CDN? Commented Aug 5, 2016 at 18:26