Code Monkey home page Code Monkey logo

fem-graphql-server's Introduction

GraphQL Students-Courses Server

This is the GraphQL server implementation used in Front End Masters' GraphQL workshop. It contains GraphQL queries and mutations to handle CRUD operations on a courses and students resource. MongoDB is used to persist the data and a connection to mLab is provided.

Getting Started

Clone the repo, install the dependencies, and run the server.

npm i
# for live reload
npm run dev
# for prod
npm start

The app will be served at localhost:8080 and GraphiQL can be accessed at localhost:8080/graphql.

Why Did You Commit Your mLab Credentials?

There is a .env file included with a connection string to an mLab database. Normally the .env file would not be committed and any access to a remote server would be hidden. The database used for this example is a throwaway. For the sake of getting started quickly, it is easier to provide direct access to a working database out of the box.

If you will be publishing work based on this example, be sure to keep any database credentials out of source control.

Why Is There A Data Folder?

Some static data is provided for the getting started examples during the workshop.

Using Your Own mLab Connection

To use your own mLab database, change the connection string value for MLAB_URL in the .env file. Read the mLab docs to get started if you are unfamiliar with it.

License

MIT

fem-graphql-server's People

Contributors

chenkie avatar

Watchers

 avatar  avatar  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.