apollo-server-micro + typescript + nexus-prisma => ⚡️
Some random awesome demo made with apollo-server-micro
with Typescript feat. nexus
& prisma1
.
😆 Feel free to take this as a reference and start implementing your own graphql microservice!
Use cli to run docker-compose
, make sure docker-compose
is installed.
# Run docker-compose up --build -d with yarn
yarn dc
ProTip: You can view and manage your docker container using lazydocker
.
Or if you prefer a fancy GUI, use DockStation instead.
Then, run this locally with yarn dev
. For production testing, use Docker (defined in docker-compose
and Dockerfile
).
.env.local
for local dev.env.production
for production docker.env
is for prisma and docker-compose (also need for building to production)
Instructions are inside .env.example
put the belows code in both .env
and .env.local
PRISMA_HOST=localhost
REDIS_HOST=localhost
Deploy this to any server that can run Docker compose. Additionally, you can further config it to use Docker Swarm.