Open browser with correct baseurl (#819)

* open browser with correct baseurl

* nits
This commit is contained in:
Endilie Yacop Sucipto 2018-07-02 00:42:52 +08:00 committed by Yangshun Tay
parent 60852a2b2e
commit e619884921

View file

@ -72,7 +72,8 @@ function checkPort() {
// start local server on specified port
const server = require('./server/server.js');
server(port, program.opts());
const host = `http://localhost:${port}`;
const {baseUrl} = require(CWD + '/siteConfig.js');
const host = `http://localhost:${port}${baseUrl}`;
console.log('Docusaurus server started on port %d', port);
openBrowser(host);
}