Skip to content

alanyudh/fullstack-next-nest-graphql-jest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fullstack-next-nest-graphql-jest

A simple book gallery website to demonstrate monorepo of full stack nodejs using :

  • NextJS
  • NestJS
  • GraphQL
  • Jest
  • Typescript
  • MongoDB
  • Antd
  • Lerna

Packages

This project is made up of 3 packages that share code using Yarn Workspaces.

  • web (React NextJS website)
  • server (NestJS GraphQL server)
  • common (code shared between web and server)

Installation

  1. Clone project
git clone https://github.com/alanyudh/fullstack-next-nest-graphql-jest.git
  1. Go into folder
cd fullstack-next-nest-graphql-jest
  1. Download dependencies
yarn
  1. Start your MongoDB server
  2. Create database called fullstack-books
  3. Import the sample data on data-mocks.csv
  4. In packages/server, copy the .env.example to env and update the mongodb variables to match your configuration
  5. Run yarn build

Usage

Start

# run web & server
yarn start:prod

# run web only
cd packages/web
yarn start:prod

# run server only
cd packages/server
yarn start:prod

# to run on development mode, replace `yarn start:prod` to `yarn start:dev`

once started, applications can be accessed at :

Test

To perform jest test :

# test web & server
yarn test

# test web only
cd packages/web
yarn test

# test server only
cd packages/server
yarn test
  • to run coverage test, replace yarn test to yarn test:cov
  • to run both lint, type-check, and jest test, replace yarn test to yarn test-all

About

A simple book gallery website to demonstrate monorepo of full stack nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published