create-graphql-server icon indicating copy to clipboard operation
create-graphql-server copied to clipboard

Build

Open vintentou opened this issue 8 years ago • 1 comments

Hi, how can I make production build?

vintentou avatar Jun 29 '17 08:06 vintentou

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.

tmeasday avatar Jun 30 '17 00:06 tmeasday