With Phoenix Endpoint, as I understand, you are serving all your pages, apis, etc from a single base page. e.g., 127.0.0.1 or whatever.com.
But for security purposes, say I want 1) my mobile API’s to be served from this endpoint, say www.myappendpoint.com and 2) the internal dashboard that talks to my database and shares the same base application logic i.e., the same module of contexts, to be from a different endpoint, www.randomsecurityunguessabledomain.xyz, and/or even obscured behind a vpn tunnel.
Should I then create two ContextWeb’s .e.g, ContextAPIWeb, ContextDashboardWeb, and then define the endpoints accordingly? I guess that doesn’t really make sense because the way phoenix works, as I understand, you have the server deployed in one endpoint, hosted in one place.
Help me understand how to make this work, if possible, or do I simply have to set up a whole new Phoenix project that talks to the same database?
Thanks a million!