Giter VIP home page Giter VIP logo

brood's Introduction

Brood API

Brood api is a simple graphql server that serves querying and manipulation of few inventory items. Learn more about Graphiql here.

In order to interact with this api a Postman Collection is added to this project that contains sample graphQL requests.

But if you are familiar with graphQL, then you may access the api through this link http://localhost:3000/graphql once the api is running locally or from the Docker image.

Project Dependencies

  • VS code Editor - Recommended since you may use the Launch Program from the Debug mode to start the project.
  • Docker
  • npm 6.9.2 or above
  • node version 10.13.0 or above.

GraphQL Dependencies

Node

This project is using that v10.13.0 LTS supported version of node

Development

To run this application on your local environment do the following:

  1. Clone the repository and navigate to project root
$ git clone [email protected]:Candore/Brood.git && cd brood
  1. Install depenencies
$ npm install
  1. Start the application

Using the VS code Debug mode, choose 'Launch Program'

or you may use

npm start

Unit Testing

This project uses JEST for unit testing. In order to run the unit test you may,

  • Use the VS Code Debug option, and you will find the jest configuration. Chosse this option and press play. You should see the Passing/Failing tests in the debug console.

  • You may also run the tests manually by entering the command.

jest run test 

A successful test run should look something like this,

JEST Output

Postman Collection

For your convenience I have added a Postman Collection here.

Please down load this file as a .json to your desktop or to a desired directory.

In order to make graphQL queries, you will need the latest version of the postman, i.e Version 7.2.2 (7.2.2) and above should support this collection file.

Docker

If you may choose to build and use a docker image, after starting the Docker app, from the root directory of the project enter the command

docker-compose up

This will build the docker image and the server should be listening on the port 3000. Once finished you should see this message in the console.

Server running at http://localhost:3000/graphql

Build Issue ?

If you may encounter a build issue related to graphql type, it can be fixed by copying the src/inventory/inventory.graphql file into dist/inventory folder and rebuilding the project.

brood's People

Contributors

kavinvkannan avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.