😱 a setup for nightmarejs on heroku
Branch: master
Clone or download
Latest commit f59b3a5 Aug 28, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildpacks change to causztic's electron buildpack Apr 5, 2018
.gitignore Initial commit Jun 11, 2017
.profile Initial commit Jun 11, 2017
Aptfile Adds libxss1 to Aptfile, updates README to scale dynos. Fixes #2. Jun 16, 2017
LICENSE Create LICENSE Jun 11, 2017
Procfile Initial commit Jun 11, 2017
README.md added heroku dashboard steps Jun 26, 2018
index.js update example Jun 11, 2017
package.json Version Bump 1.1.0 May 15, 2018



NightmareJS on Heroku Heroku deploy

contributions welcome license GitHub issues


NightmareJS is an awesome highlevel webscraping and browser automation library built ontop of electron. This repo is a good starting place to be able to use it with some default setups ontop of heroku using the following instructions. Read more

Getting started

  • git clone --depth 1 git@github.com:oscarmorrison/nightmare-heroku [new-project-name]

  • cd [new-project-name]

  • rm -rf .git

  • git init

  • setup git remote repository on github.com from existing code

git remote add origin git@github.com:[username]/[new-project-name].git
git add -A
git commit -m "Initial commit"
git push -u origin master
  • heroku create
  • heroku stack:set cedar-14
  • set build packs
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt &&
heroku buildpacks:add --index 2 https://github.com/captain401/heroku-buildpack-xvfb.git &&
heroku buildpacks:add --index 3 https://github.com/causztic/heroku-electron-buildpack.git &&
heroku buildpacks:add --index 4 https://github.com/heroku/heroku-buildpack-nodejs.git
  • git push heroku master
  • goto heroku dashboard and select created app; install Heroku Scheduler add-on
  • heroku ps:scale web=1
  • node ./index.js to verify nightmare runs correctly locally; npm install needs to be run. The following output should be seen.
Welcome to Nightmare scrape
NightmareJS on Heroku the ultimate scraping setup
All done
  • Open heroku app from heroku dashboard. 'Application error' is displayed because no routes have been defined yet so this is normal in this case.
  • heroku logs to check output for any errors. If everything went well, near the bottom of the output the 'Welcome to Nightmare scrape' messages as displayed above should appear. Now, you can work on the rest of your code knowing that nightmarejs will work on heroku as it works locally.