Thank you very much Brian. It worked.

I would like to know how I can set up a local instance of Nginx that
proxies to my backend. I see a lot of benefits in having this capability.

Regards,



On Sun, Oct 31, 2021 at 8:43 AM Roman Isitua <[email protected]> wrote:

> Thanks for this response. I will certainly try the below configuration and
> revert.
>
>
> However, I want  to understand your usage of nginx.
>
> My approach is to develop on my local machine then deploy to test server
> then test there.
>
> If I understood you correctly, you are deploying the front end in your
> local machine however you are using nginx to route traffic to your test
> server ?
>
> I would appreciate if you have links on how to do this. Sounds
> very interesting.
>
> On Tue, 26 Oct 2021, 23:15 Brian Raymes, <[email protected]> wrote:
>
>> Correct, remove the hostname and IP from your configuration and it will
>> infer it at runtime. FYI, I’m using crux as well, although, I have mine
>> configured a bit differently.
>>
>>
>>
>> Example for you:
>>
>>
>>
>> <mx:RemoteObject id="serviceDAO"
>>
>>      endpoint="messagebroker/websocket-amf
>> <http://localhost:8080/messagebroker/websocket-amf>"
>>
>>      destination="genericService">
>>
>>
>>
>>     <mx:method name="findWithNamedQuery">
>>
>>     </mx:method>
>>
>>
>>
>> </mx:RemoteObject>
>>
>>
>>
>> Then, what I do, is set up my nginx proxy to forward traffic to my test
>> server. Have the forward include the “spaceiofm”. Then, your code is
>> deployment agnostic.
>>
>>
>>
>> Hope that helps. Let me know if you need more concrete examples.
>>
>>
>>
>> Brian
>>
>>
>>
>> *From:* Roman Isitua <[email protected]>
>> *Sent:* Monday, October 25, 2021 12:25 PM
>> *To:* [email protected]
>> *Subject:* Re: [EXTERNAL] Configuring rpc end points in royale
>>
>>
>>
>> Hi Brian,
>>
>>
>>
>> Thanks for your response. Though I am still not clear how your suggestion
>> will work. Formy app I am using crux. There is a beans.xml file where I
>> configured my remote end points as follows
>>
>>
>>
>>
>>
>>  <mx:RemoteObject id="serviceDAO"
>>
>>                          endpoint="
>> http://localhost:8080/messagebroker/websocket-amf";
>>
>>                          destination="genericService">
>>
>>             <mx:method name="findWithNamedQuery">
>>
>>             </mx:method>
>>
>>          </mx:RemoteObject>
>>
>>
>>
>>
>>
>> When running the program on my development pc my server is localhost. So
>> it works fine. When I deploy to the test server, the above configuration
>> will not work. I have to adjust the ip address to be something like this
>>
>>
>>
>>  <mx:RemoteObject id="serviceDAO"
>>
>>                          endpoint="
>> http://192.68.43.22:8080/spaciofm/messagebroker/websocket-amf";
>>
>>                          destination="genericService">
>>
>>             <mx:method name="findWithNamedQuery">
>>
>>             </mx:method>
>>
>>          </mx:RemoteObject>
>>
>>
>>
>>
>>
>> If I do this, it works.
>>
>>
>>
>> My guess is that there should be a way to configure the end point such
>> that it defaults to the server host name without any configuration.
>>
>>
>>
>> Regards,
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Oct 18, 2021 at 8:49 PM Brian Raymes <[email protected]>
>> wrote:
>>
>> Hi Roman,
>>
>>
>>
>> I do this by running a local instance of Nginx that proxies to my backend
>> (or wherever you need as it’s easily changeable).
>>
>>
>>
>> As for RPC configuration, I have mine all set relatively, as-in, simply:
>>
>>
>>
>> AMFChannel("my-amf", "messagebroker/amf");
>>
>>
>>
>> This way, they always look local, but proxy through Nginx to any server I
>> need throughout the development/test process.
>>
>>
>>
>> By doing it this way, I never have to modify a build. They just work in
>> call cases, whether that be local for development, or remote when deployed.
>>
>>
>>
>> If you need any config assistance for Nginx, let me know.
>>
>>
>>
>> Regards,
>>
>> Brian
>>
>>
>>
>> *From:* Roman Isitua <[email protected]>
>> *Sent:* Monday, October 18, 2021 9:23 AM
>> *To:* [email protected]
>> *Subject:* [EXTERNAL] Configuring rpc end points in royale
>>
>>
>>
>> Hi,
>>
>>
>>
>> In an app, I am working on. I am using rpc based end points to access my
>> back end. On my development machine I use localhost. I intend to start
>> deploying the the app to a test server for testing. I realise that each
>> time, I do a deployment to the test server, I have to remember to switch
>> from local host to the ip address of the test server. I do this via the
>> beans.mxml configuration files. (I am using crux). Sometimes I forget to do
>> this,  so I have to redeploy again.
>>
>>
>>
>> My question is, is there a better way to configure my rpc end points such
>> that I don't have to be changing ip addresses of the rpc end points in the
>> beans.mxml file ?
>>
>>
>>
>> Once testing is done, the app will be moved to production, again, ip
>> addresses will change.
>>
>>
>>
>> What is the best practice for configuring rpc end points in royale ?
>>
>>
>>
>> Is there a way to store deployment environments specific configurations  ?
>>
>>
>>
>>
>>
>> Regards,
>>
>>

Reply via email to