-
-
Save MaxKramnik/28d9b08091f1ac1d9dc715ddf860ad6c to your computer and use it in GitHub Desktop.
Minimal babel boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ "es2015" ] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}!`); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"babel": "^6.5.2", | |
"babel-preset-es2015": "^6.9.0", | |
"babel-register": "^6.9.0", | |
"express": "^4.13.4" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('babel-register'); | |
require('./app'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment