Use random port numbers in test and example apps #321

Merged
merged 1 commit into from Feb 9, 2017

Projects

None yet

2 participants

@wincent
Contributor
wincent commented Feb 9, 2017

#320 suggested changing the hard-coded port number in the example server so that it doesn't collide with the test app.

Instead of that, let's use random port numbers, which will strictly avoid any port collisions, including with apps that have nothing to do with this repo, because the OS will assign an unused port.

Tested by simultaneously launching:

# In one terminal:
cd example
npm install
npm run start # prints: Started on http://localhost:51638/

# In another terminal:
npm run dev # prints: Started on http://localhost:51578/

Then hit both links and see they work.

@wincent wincent Use random port numbers in test and example apps
graphql#320 suggested changing the
hard-coded port number in the example server so that it doesn't collide
with the test app.

Instead of that, let's use random port numbers, which will strictly
avoid any port collisions, including with apps that have nothing to do
with this repo, because the OS will assign an unused port.

Tested by simultaneously launching:

    # In one terminal:
    cd example
    npm install
    npm run start # prints: Started on http://localhost:51638/

    # In another terminal:
    npm run dev # prints: Started on http://localhost:51578/

Then hit both links and see they work.
c046bea
@wincent wincent merged commit 0199a44 into graphql:master Feb 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment