Skip to content

gigalixir/example-split-domains-umbrella-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoodUmbrella

This is an example application to use with Gigalixir.

food_umbralla is an umbrella project which contains these applications:

  • proxy - the server endpoint which proxies requests to the other apps
  • fruits - a simple Phoenix app that serves a list of fruits
  • veggies - a simple Phoenix app that serves a list of vegetables

The proxy app is utilizing the main_proxy library to proxy requests to the other apps. The proxy definitions are configured in the apps/proxy/lib/proxy/proxy.ex file.

In this example, we have deployed to Gigalixir with two custom domains:

  • fruits.gigalixir.com
  • veggies.gigalixir.com

Requests to fruits.gigalixir.com are proxied to the fruits app and requests to veggies.gigalixir.com are proxied to the veggies app.

Currently each app has one endpoint /api/ which returns a list of fruits or vegetables respectively.

> curl http://fruits.gigalixir.com/api/
{"fruits":["apple","banana","cherry"]}

> curl http://veggies.gigalixir.com/api/
{"veggies":["carrot","broccoli","spinach"]}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages