Setting up a gitignore file

Now, before we start getting things on GitHub and Heroku, we'll first set up a few things inside Atom. We need to set up a .gitignore file, which we'll provide in the root of the project.

Inside .gitignore, the only thing we'll be ignoring is the node_modules folder. We do not want to commit any of this code to our repo, because it can be generated using npm install and it's subject to change. It's a real pain to manage that sort of thing, and it is not recommended that you commit it.

The next thing we'll do is configure a few things for Heroku. First up, we have to use the process.env.PORT environment variable. I'll create a constant called port next to the publicPath variable, setting it equal to process.env.PORT ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.