Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added heroku dashboard steps #11

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@

## Getting started
- `git clone --depth 1 git@github.com:oscarmorrison/nightmare-heroku [new-project-name]`

- `cd [new-project-name]`
- `rm -rf .git`
- `git init`
- `heroku create [app-name]`
- 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
```
Expand All @@ -28,4 +36,15 @@ heroku buildpacks:add --index 3 https://github.com/causztic/heroku-electron-buil
heroku buildpacks:add --index 4 https://github.com/heroku/heroku-buildpack-nodejs.git
```
- `git push heroku master`
- `heroku ps:scale web=0 worker=1`
- 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.