This is a project to learn some JS stuff like GraphQL (with both - Apollo Server and Client), SSR with NextJS and ExpressJS, standalone NodeJS service - all dockerized and hosted on VPN (nginx).
- prod docker-compose
- mongodb user/password
- logs
- linters!
- react hooks
- redux & redux dev tools
- formik & yup validation
- material ui
- next (ssr and ssg pages) with express
- passport auth (custom, google, fb)
- i18n
- graphql powered by Apollo (client and server)
- typescript
- mongodb
- docker-compose
- deployed on VPS
- ngnix
Change name of .env.example
to .env
in client
and enter your keys.
To populate database run docker exec -it hs-client yarn populateDb
on running project.
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
- Run development:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
. - Enter client container to build NextJS app (development is required for SSG from database):
docker exec -it hs-client /bin/sh
. - Build client:
yarn build
(Next requires database etc. to generate SSG during building process). - After build, exit client (
exit
) and stop developmentdocker-compose -f docker-compose.yml -f docker-compose.dev.yml stop
. - Finally run:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up
to run built app.