Skip to content

Instantly share code, notes, and snippets.

@jgilbertcastro
Last active November 7, 2019 16:33
Show Gist options
  • Save jgilbertcastro/43971315805763bf261efa26081da434 to your computer and use it in GitHub Desktop.
Save jgilbertcastro/43971315805763bf261efa26081da434 to your computer and use it in GitHub Desktop.
inde.js
const express = require('express');
const ExpressGraphQL = require("express-graphql");
const schema = require("./graphql/post/post.js");
const app = express();
app.use("/graphql", ExpressGraphQL({ schema: schema.schema, graphiql: true}));
app.listen(4000, () => {
console.log("GraphQL server running at http://localhost:4000.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment