create-graphql-server
create-graphql-server copied to clipboard
Build
Hi, how can I make production build?
Hey @vintentou!
It's actually not that difficult, we should really add it to CGS. I haven't had a lot of time to look at it.
Basically we could add a build script that runs babel into a dist directory and a start script that runs dist/index from there. We'd need to add some instructions about setting MONGO_URL and there'd be a few details to make sure we get right.
OTOH; it's not a huge deal to just run the development mode in production (I'm doing so with a couple of apps, although they don't get a lot of traffic so YMMV). If you pass MONGO_URL it won't start up the local mongo, and although babel-node isn't as efficient as node in my experience it's not terrible.