- Run the following to lauch and deploy this server to flyio
fly launch --org intuned-dev --remote-only
fly deploy --remote-only
-
cd into update HOSTNAME and MACHINE_URL contansts with the flyio veriables
-
cd into
testing
and runts-node index.ts
this should run themain
function. Read note before running.
NOTE:
-
This function calls
installDepsAndGetBrowserSession
which will create a directory, mount templete files and install dependacies and will get you a browser session to the test connection to it. The connection string should work normally. This connection string works on both localhost and flyio. -
The websocket url that fails to connect on flyio is on
getNodeProcessConnectionUrl
. To get that one out runflyctl ssh console -a {flyio-app-name}
- start node debugging process
node --inspect-brk ./node_modules/.bin/intuned-api-runner
- uncomment
getNodeProcessConnectionUrl
and commentinstallDepsAndGetBrowserSession
and runts-node index.ts
inside testing folder. - You'll get the connection string in console similar to
ws://{hostname}/devtools/process/631e2c83-3877-46ee-b130-8763d5d1c1c5
. This is what were we are struggling to connect to and couldn't reproduce localy or on other hosting services like aws.