Skip to content

hising/apollo-next-express-monorepo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Source code for the Dev.to article - Next.js, Apollo Client and Server on a single Express app

This article describes two things:

  1. How to fit Next.js with Apollo Client on front end and Apollo Server GraphQL api into a single Express app. Another important requirement was to have SSR support. As there is not much info about it out there, this is the main purpose of this guide.
  2. How to organize everything nicely into yarn workspaces monorepo and deploy to Heroku as a single free plan app. You will find a lot of into about it, but I included it here as a part of the process of the project I was working on.

Usage Local

Make sure you have Node.js 13+ as specified in package.json "engines" object. It is only required for Heroku deployment. If you have older versions, just remove it from package.json.

yarn install
yarn dev

Usage Docker

docker build -t monorepo .
docker run -dp 3003:3003 monorepo

open http://localhost:3003

GraphQL Playground at http://localhost:3003/graphql

About

Source code for the Dev.to article - Next.js, Apollo Client and Server on a single Express app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Other 1.0%