Skip to content
This repository has been archived by the owner on Oct 20, 2019. It is now read-only.

Websocket altenate server test #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

trepmag
Copy link
Contributor

@trepmag trepmag commented Jan 9, 2019

Hello Fred,

This pull request add a websocket test to an alternate echo server beside the initial one at echo.websocket.org.

The alternate echo server use the docker jmalloc/echo-server image as you suggested.

The javascript test use a variable WS_MAPX_URI to set the correct address which can be differentiated for prod in the webpack.prod.config.js file; then it requires the script to be built as follow:
$ npm run prod

Note, as I don't know the deployment details, the webpack generated dist/main.js is actually part of the repository...

@fxi
Copy link
Owner

fxi commented Jan 9, 2019

Great. Looks good. Thanks !

For the client side webpack build, maybe /docs could be a better choice, as it's the default (and only choice outside master's root) for github page. Not important if we put both client/server in our stack. But maybe some people will still use fxi.io/map-x-tests, which is hosted here.

I have to check with @thomaspiller what was the dedicated subdomain for those tests so we could put our the WS_MAPX_URI as an environment variable.

As soon as I'm ok with this, I will merge.

@trepmag
Copy link
Contributor Author

trepmag commented Jan 10, 2019

Ok, I didn't realize it was hosted here; so yes we should use /docs for webpack build (let's change that the same time we set the correct WS_MAPX_URI for production).

@antobenve
Copy link

Hi @trepmag,

Thanks for your work! It's very helpful!

Do you think you can 1) extend the duration of the test on the maintainance of the connexion to an undefined time and 2) allow a user to stop it on demand? For instance with a simple button that terminates the ping test.

Thanks

@trepmag
Copy link
Contributor Author

trepmag commented Jan 11, 2019

Hi, yes the test can be modified the way you mentioned.

Now, I'm wondering if the 'Copy to your clipboard' button should be disabled until the user click the webservice test stop button? If not the user might copy and send an unfinished websocket test...

@antobenve
Copy link

I would say you're right.

@trepmag
Copy link
Contributor Author

trepmag commented Jan 14, 2019

Hi, I added this infinite websocket ping test to the same PR branch...

@antobenve
Copy link

Hi @fxi , could this test be updated with @trepmag 's edits?

@fxi
Copy link
Owner

fxi commented Apr 2, 2019

@antobenve Yep, I can't really merge this into master, as it's also the same branch as the live page. We should make both services public first. See with @thomaspiller. Try to make this happen locally, both images are already built. Then make the same in the prod stack. Once it's up and running, I will remove or redirect the github page linked to this repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants