Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdsaleemj/a8748f5804c2273193a47bd6dc7ccfff to your computer and use it in GitHub Desktop.
Save mdsaleemj/a8748f5804c2273193a47bd6dc7ccfff to your computer and use it in GitHub Desktop.

##Running ES6 javascript code in NodeJS envrionment.

  1. Try to install babel-cli

npm install --save-dev babel-cli npm install --save-dev babel-preset-es2015

  1. Directly running js file

./node_modules/babel-cli/bin/babel-node.js --presets es2015 <<filenam.js>>

#####NOTE: For More information refer to babel docs and below repo

https://github.com/babel/example-node-server

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