Creating a Node.js/React.js Passenger App

Hello!

I’ve created a proof-of-concept React.js app that I’m trying to deploy as a passenger app on a locally running instance of OOD. When I do so, my html gets served up, but my javascript is ignored. Do you have any hints on how I might go about fixing or researching the issue? If I run “node app.js” locally in my command line, everything starts up ok.

Thank you!

Steve

Hi Steve.

Thanks for your post and welcome to the Open OnDemand Community. I am working another question right now, and will get back with you shortly.

Thanks,
-gerald

Hi Steve.

I don’t want to make assumptions, so I’m going to ask.

Which version of OnDemand are you running and what is your Operating System?

Thanks,
-gerald

Hi Gerald,

Thanks for the help! I’m running on and Intel Mac (macOS 12.4) and running v2.0.27 of OnDemand.

One consideration is that I’m running OnDemand as part of this toolset: https://github.com/ubccr/hpc-toolset-tutorial. Bob, are there any wrinkles in the HPC toolset that Gerald should be made aware of?

Thanks!

Steve

Nothing that I am aware of. I had been using the PEARC21 release, though if you’re using the most recent, that would be for PEARC22. In my hands, the former worked well for both the conference tutorial and with the online docs. Since I had rather limited knowledge of the system & what I was doing, my kicking the tires was pretty minimal.

But curious to know how this works out, and how we can leverage other passenger apps from within our own.

:slight_smile: B

There’s a prefix to the URI. Specifically /pun/dev/<app_name> or /pun/sys/<app_name>.

Here’s how the shell app (Node.js using express package) uses PASSENGER_BASE_URI (one of the 2 paths above) to prefix it’s routes.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.