Giter Club home page Giter Club logo

express-graphql-demo's Introduction

Express GraphQL API

Installation

Get this repository on your machine by cloning it!

git clone https://github.com/nananananate/express-graphql-demo

Navigate into the repository.

cd express-graphql-demo

Now install the dependencies needed.
If you're curious on what the dependencies are, we explain them later.

npm install

You are now ready to run the demo!

Running the app

For learning purposes, there are two apps (or servers) that you can run!

The Basic server

The basic server runs by using this command:

node server-basic

With server-basic being the name of the file holding our basic server, server-basic.js.

**Now your server is running on localhost:8000

A More Advanced Server

This server more closely reflects a real-world Express GraphQL API. It is modeled after PeterPortal API.

The more advanced server can be run with this command:

node server

Since server.js is the expected name, you can also run the app with this command:

npm start

Now your server is running on localhost:8080

Note that the port is now 8080! It is a different port so that you can run both servers concurrently to compare them.

Dependencies

These dependencies are installed when you run npm install, but let's explain why we use them!

express

express is a Node.js web framework, typically used for a back-end web app. And if you know back-end, you know that you'll be making a Web API!

graphql

Recall that GraphQL is a language, not a tool. The graphql dependency is the official Javascript implementation of GraphQL, developed by the GraphQL Organization.

express-graphql.

express-graphql is what links graphql with express. Without it, there would be no GraphQL endpoint on your Express app!

express-graphql-demo's People

Contributors

tisuela avatar

Stargazers

 avatar  avatar

Watchers

 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.