Merge pull request #174 from johnthad/issue-167
Use the dev.port value from config/index.js vs. hard coding.
This commit is contained in:
commit
a3f0d8aac0
@ -3,11 +3,12 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const Rx = require('rxjs/Rx');
|
||||
const http = require('http');
|
||||
const config = require('../config');
|
||||
|
||||
const fetchResponse = () => {
|
||||
return new Promise((res, rej) => {
|
||||
try {
|
||||
const req = http.request('http://localhost:8080/#/', response => res(response.statusCode));
|
||||
const req = http.request(`http://localhost:${config.dev.port}/#/`, response => res(response.statusCode));
|
||||
req.on('error', (err) => rej(err));
|
||||
req.end();
|
||||
} catch (err) {
|
||||
@ -46,7 +47,7 @@ const convert = async () => {
|
||||
args: ['--no-sandbox']
|
||||
});
|
||||
const page = await browser.newPage();
|
||||
await page.goto('http://localhost:8080/#/resume/' + dir.name, {
|
||||
await page.goto(`http://localhost:${config.dev.port}/#/resume/` + dir.name, {
|
||||
waitUntil: 'networkidle2'
|
||||
});
|
||||
await page.pdf({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user