ES5 code will already work with ES6 code. For nodejs, just install the babel kernel:
npm install babel-core --save
and you will also need npm install babel-preset-es2015 --save
create a .babelrc file with the following:
{ "presets": [ "es2015"], "ignore": "node_modules" }
run the node application through (assuming your file is app.js)
babel-node app
Alternatively, you can add require('babel-core/register'); to the beginning of your node project, and any code below will be crowded with babel ...
The recommended way is to create something like main.js with the following contents:
require('babel-core/register'); require('./app.js');
then just run node main.
glued source share