Going Live Chapter 10
This command will link our application to the Heroku application that we just created.
The setup part is done. Now, we can go ahead and make some changes in our application.
Commit to the GitHub repo the way we have been doing so far and push the changes.
Now, the simple command to deploy to the Heroku app is to run the following command:
$ git push heroku master
There are a couple of things that we need to take care of here.
Since we are serving the Vue.js components by converting them to static files using
the serve-static package in server.js, we need to update the start script
in package.json to run the node server. Let's update the start script with the following
line in package.json:
"scripts": {
"dev": "webpack-dev-server --inline --progress --config
build/webpack.dev.conf.js",
"start": "nodemon server.js",
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js -
-single-run",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
"build": "node build/build.js",
"heroku-postbuild": "npm install --only=dev --no-shrinkwrap && npm run
build"
},
Also, in the config/Config.js file we have the following:
module.exports = {
DB: 'mongodb://localhost/movie_rating_app',
SECRET: 'movieratingappsecretkey',
FACEBOOK_APP_ID: <facebook_client_id>,
FACEBOOK_APP_SECRET: <facebook_client_secret>,
TWITTER_APP_ID: <twitter_consumer_id>,
TWITTER_APP_SECRET: <twitter_consumer_secret>,
GOOGLE_APP_ID: <google_consumer_id>,
GOOGLE_APP_SECRET: <google_consumer_secret>,
LINKEDIN_APP_ID: <linkedin_consumer_id>,
LINKEDIN_APP_SECRET: <linkedin_consumer_secret>
}