Brian Han

How I Start Every Project

Table of Contents
Photo by Jefferson Santos of a macbook with the sunrise outside

Photo by Jefferson Santos on Unsplash (Cropped)

New Computer Setup

Install hombrew

Install git using homebrew.

brew install git

Install node with nvm.

New Project Setup

Create a new folder for your project and change into that directory.

mkdir every-new-project && cd every-new-project

Create a new package.json file.

npm init -y

Your package.json should look like this:

  "name": "every-new-project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "keywords": [],
  "author": "",
  "license": "ISC"

Create a .gitignore file so that you don’t accidentally any files or folders you want to keep out of version control. I usually put node_modules in this file.

touch .gitignore
echo node_modules > .gitignore

Create an .nvmrc file with the node version you want to use for this project. For personal projects, I just write stable in this file.

In the Deeper Shell Integration section of NVM’s readme, you can learn how to customize your .bashrc or .zshrc file so that NVM will automatically change your node version to the one listed in the project’s .nvmrc file.

touch .nvmrc
echo stable > .nvmrc

Maybe you’re working on a non-personal computer and you want to setup your project with your personal GitHub username and email. I personally like to just update my project’s .git files with this info. This is a minor thing so don’t worry too much if you want to skip this.

git init
git config "Your Name"
git config ""

Your project’s .git/config file should have a new user section added.

  name = Your Name
  email =

Finally, create a new repository on your GitHub account and follow the instructions on GitHub for creating a new project.

You can find this work on my GitHub here.