Skip to content

Commit

Permalink
fix: Serve on correct port
Browse files Browse the repository at this point in the history
Update serve command to pass object to get-port
  • Loading branch information
gburnett authored and tmcw committed Aug 17, 2018
1 parent fb37789 commit 4d59f6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/bin-watch-serve.js
Expand Up @@ -63,9 +63,9 @@ test(
return pEvent(docProcess.stdout, 'data').then(function(data) {
const portNumber = data
.toString()
.match(/documentation.js serving on port (\d+)/);
.match(/documentation.js serving on port 4004/);
expect(portNumber).toBeTruthy();
return get(`http://localhost:${portNumber[1]}/`).then(function(text) {
return get(`http://localhost:4004/`).then(function(text) {
expect(text.match(/<html>/)).toBeTruthy();
docProcess.kill();
});
Expand Down
2 changes: 1 addition & 1 deletion src/commands/serve.js
Expand Up @@ -54,7 +54,7 @@ module.exports.handler = function serve(argv: Object) {
}
}

getPort(argv.port).then(port => {
getPort({ port: argv.port }).then(port => {
const server = new Server(port);
let watcher;

Expand Down

0 comments on commit 4d59f6f

Please sign in to comment.