Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heroku-examples/node-harmony-example
A sample app demonstrating how to run node with ES6 Harmony enabled on Heroku.
https://github.com/heroku-examples/node-harmony-example
Last synced: 2 days ago
JSON representation
A sample app demonstrating how to run node with ES6 Harmony enabled on Heroku.
- Host: GitHub
- URL: https://github.com/heroku-examples/node-harmony-example
- Owner: heroku-examples
- Created: 2014-02-10T05:42:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-10T05:42:48.000Z (about 11 years ago)
- Last Synced: 2024-04-14T18:35:50.135Z (10 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 9
- Watchers: 8
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Harmony Example
In December 2013, a [new Heroku node buildpack was released](https://blog.heroku.com/archives/2013/12/10/new-node-buildpack) with support for all versions of node, including pre-release versions. This means you can run your ECMAScript 6 Harmony Node.js apps on Heroku today!
Harmony enables features like [block scoping](https://github.com/JustinDrake/node-es6-examples#block-scoping), [generators](https://github.com/JustinDrake/node-es6-examples#generators), [proxies](https://github.com/JustinDrake/node-es6-examples#proxies), [weak maps](https://github.com/JustinDrake/node-es6-examples#weak-maps), etc.
This is a sample app to demonstrate the required steps to set it up on Heroku.
## Steps
- In package.json, set `engines.node` to a newer node version like `0.11.x`
- In package.json, `scripts.start` must run `node` with three flags: `--harmony`, `--use_strict`, and `--harmony_generators`. See [JustinDrake/node-es6-examples](https://github.com/JustinDrake/node-es6-examples) for details.
- To find out what versions of node are currently supported on Heroku, visit [semver.io](http://semver.io/)
- As long as your node app has a `scripts.start` entry, a Procfile is not required to run on Heroku.## License
[WTFPL](http://wtfpl.org/)