Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

/bin/api harmony-generators #7

Closed
rynz opened this issue Jun 9, 2014 · 5 comments
Closed

/bin/api harmony-generators #7

rynz opened this issue Jun 9, 2014 · 5 comments

Comments

@rynz
Copy link

rynz commented Jun 9, 2014

git clone https://github.com/koajs/api-boilerplate.git
cd api-boilerplate
npm install
chmod +x bin/api
./bin/api
/api-boilerplate/node_modules/koa-response-time/index.js:15
  return function *responseTime(next){
                  ^
SyntaxError: Unexpected token *

How can I run it with --harmony-generators flags?

@heshiming
Copy link
Contributor

You'll need to grab nvm: https://github.com/creationix/nvm . Then nvm install v0.11.13, nvm use v0.11.13, then run node --harmony.

@rynz
Copy link
Author

rynz commented Jun 9, 2014

I understand the node --harmony flag etc - I'm wondering if it's possible to run directly from the https://github.com/koajs/api-boilerplate/blob/master/bin/api script. There doesn't seem to be a way to pass it the harmony flag.

@tj
Copy link
Member

tj commented Jun 10, 2014

nope, you have to use something like the "v8-args" module to effectively wrap/proxy the executable. For now I just do node --harmony bin/api, that sort of idea, hopefully in the near future generators will be by default

@tj tj closed this as completed Jun 10, 2014
@tj
Copy link
Member

tj commented Jun 10, 2014

(we should doc ^ though, it's not clear that's for sure)

@rynz
Copy link
Author

rynz commented Jun 10, 2014

Okay no worries, thanks for the heads up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants