IVR
Deploying a Phoenix backend with a separate frontend
Hi all,
I’m wondering if anyone would be able to recommend some options for deploying a Phoenix backend with a separate frontend. If I have a Phoenix-only app, then I could use something like Gigalixir. If, on the other hand, I have a standalone frontend, I don’t think that I can do that anymore.
If anyone has any experience with this, then please let me know.
Cheers
Most Liked
RudManusachi
Definitely we can have an API in Phoenix and separate frontend application that talks to that api.
There are even flags for Phoenix generator to omit frontend related parts:
mix phx.new app_name --no-html --no-webpack
(see more mix phx.new — Phoenix v1.8.8)
BTW, channels with WebSocket should also be available if required =)
derek-zhou
You still can. You can put them together and let phoenix to serve the static files.
Or if you prefer a separate, standalone frontend app, there are even more choices to host it, many of them are free. However, now you have 2 domain names (front end, api backend) your api backend need to have CORS setup.
derek-zhou
Always use your own domain name. you can use a sub domain, like:
- frontend: www.myfancydomain.com
- backend: api.myfancydomain.ocm
logistic issues aside, you may want to share cookie.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








