Skip to content

💪 A Graphql setup on apollo server with Hapi-typescript and mongoDB, fully modulerise with Todo REST API and Todo Graphql Query.

License

Notifications You must be signed in to change notification settings

AlxPatidar/hapi-graphql-typescript

Repository files navigation

Hapi-graphql-mongodb-typescript

hapi-graphql-typescript uses Apollo Server, Typescript, Node.js, Hapi and MongoDB.

Quick Start

The quickest way to get started with Hapi-graphql-typescript server use github repository and clone as shown below:

# Have access problem use sudo or run terminal with adminstration
$ git clone https://github.com/AlxPatidar/hapi-graphql-typescript.git server
# change directory to server folder
$ cd server

Install dependencies and devDependencies:

$ yarn install / npm install

Configuration

Start mongodb server:

$ sudo service mongod start
# restore database where replace PATH where project located
# example:- mongorestore /home/user/work/server/database 
$ mongorestore PATH/server/database 

Configuration environment and change basic credentials:

$ cp .env.example .env

Start Server

Start the apollo/hapi server:

$ yarn start

Start the development server:

$ yarn start:dev

View the website at: http://localhost:4003/graphql

Run Test

# Only single and simple test is present
$ yarn run test

Features

  • Language - TypeScript
  • Apollo server (Graphql)
  • With REST API - Hapijs
  • Focus on high performance
  • TsLint
  • Circle CI
  • Docker
  • Validation - Joi (For reset API)

Useful npm/yarn commands

  • yarn build - Transpile TypeScript code
  • yarn clean - Remove build folder
  • yarn start - Run application
  • yarn start:dev - Run application in development mode
  • yarn run fix - Run for typescript linting
  • yarn run test - Run for test

Docs & Community

About

💪 A Graphql setup on apollo server with Hapi-typescript and mongoDB, fully modulerise with Todo REST API and Todo Graphql Query.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published