apex / up-examples

Example apps, apis, and sites for Up.
389 stars 42 forks source link

Add `node-micro` example #62

Closed lukeed closed 6 years ago

lukeed commented 6 years ago

This combines the micro binary & a custom node-v8.9.0 binary.

tj commented 6 years ago

I can't help but feel like all the stuff it requires negates the niceness of a CLI, especially when it ends up being ./node-v8.9.0-linux-x64/bin/node node_modules/.bin/micro --host localhost --port $PORT haha.

Once they support v8 it'll be ok, but for now it takes just as much – if not more – lines just to run micro than micro itself saves.

lukeed commented 6 years ago

Lol yeah, it's a bit silly in this configuration, but it is the usage pattern listed all over their README, so I think it makes sense to show how to achieve that on Lambda.

tj commented 6 years ago

Seems like an anti-pattern to me, for what is otherwise just http.createServer() with flag parsing for flags you wouldn't otherwise have to pass since we're just relaying the env PORT anyway

lukeed commented 6 years ago

Doesn't matter to me if you discard it. Or I can change it to be Node 8.9 with programmatic.

I kept it this way because of the Slack thread & cuz of their README instructions.

tj commented 6 years ago

yea I guess we can revise it when it becomes less of a hack! thanks man

lukeed commented 6 years ago

Haha okay, ping me if I don't notice if/when it changes.