From 8368c871aa7f984c262345847930c438398c3ed6 Mon Sep 17 00:00:00 2001 From: Thad Humphries Date: Fri, 15 Dec 2017 16:43:21 -0500 Subject: [PATCH] Use the dev.port value from config/index.js vs. hard coding. --- scripts/export.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/export.js b/scripts/export.js index 634de11..6bbf756 100755 --- a/scripts/export.js +++ b/scripts/export.js @@ -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({