Skip to content

Commit

Permalink
Merge pull request #155 from julianpoy/fix/#154-fix-puppeteer
Browse files Browse the repository at this point in the history
Fix/#154 Fix puppeteer
  • Loading branch information
julianpoy authored Feb 5, 2019
2 parents 1ca36eb + 321cb5b commit d8192cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Backend/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ router.get(
}
]
}).then(async (user) => {
const browser = await puppeteer.launch({
headless: (process.env.NODE_ENV || 'dev') !== 'dev'
});

Raven.captureMessage('Starting import job', {
level: 'info'
});
Expand All @@ -88,8 +92,6 @@ router.get(
msg: "Starting scrape..."
});

const browser = await puppeteer.launch({ headless: false });

try {
var username = req.query.username;
var password = req.query.password;
Expand Down
2 changes: 1 addition & 1 deletion reqs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# NightmareJS Scraper Engine Reqs
sudo apt install xvfb libasound2 libgconf-2-4 libgtk2.0-0 libxss1 ttf-freefont -y
sudo apt install libnss3 libasound2 libxss1 -y

sudo npm install -g electron --unsafe-perm=true --allow-root

Expand Down

0 comments on commit d8192cf

Please sign in to comment.