Skip to content

Instantly share code, notes, and snippets.

@bboydflo
Forked from bdchauvette/.babelrc
Last active December 2, 2019 14:16
Show Gist options
  • Save bboydflo/db2fc2b7bebb3e8adbc8de906c8d1734 to your computer and use it in GitHub Desktop.
Save bboydflo/db2fc2b7bebb3e8adbc8de906c8d1734 to your computer and use it in GitHub Desktop.
[Minimal node and babel boilerplate] minimal node and babel boilerplate #webdev
{
"presets": [ "es2015" ]
}
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.send('Hello World!');
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}!`);
});
{
"dependencies": {
"babel": "^6.5.2",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"express": "^4.13.4"
}
}
// everything should work just fine (no need for babel) if using node v12.x or higher.
require('babel-register');
require('./app');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment