mjhm / cucumber-api

Cucumber JS step definitions for API testing
MIT License
0 stars 0 forks source link

Allow server port to be specified as argument #5

Open mjhm opened 8 years ago

mjhm commented 8 years ago

https://github.com/mjhm/cucumber-api/blob/master/example/testapp/src/main.go#L41

port:8080 is a special http port, so we should avoid it. Generally it's best to allow the port to be specified explicitly or in a config file to avoid clashes. It's also useful to print to stdout the server route (e.g. "serving on host localhost:3001") where we can target manual tests.

allonsy commented 8 years ago

I was thinking of this earlier but I erred on the side of laziness considering it was a testapp. But If it would be beneficial I can put it a quick 5 minute fix.

allonsy commented 8 years ago

I'm going to implement this feature just in case the user already has a server running on whatever port we may choose to hardcode