Skip to content

Instantly share code, notes, and snippets.

@kabeer11000
Forked from rahman541/ES6-Setup.md
Created October 4, 2020 14:05
Show Gist options
  • Save kabeer11000/dd98d5cdced654cb228623a7fddf17a5 to your computer and use it in GitHub Desktop.
Save kabeer11000/dd98d5cdced654cb228623a7fddf17a5 to your computer and use it in GitHub Desktop.
ES6 Setup with nodemon

ES6 Setup

npm init -y
npm i --save-dev nodemon
npm add babel-preset-env babel-cli

Create a .babelrc config in your project root. Insert the following

{
  "presets": ["env"]
}

In package.json add this to scipts:

"dev": "nodemon --exec babel-node index.js"

To run: npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment