如何配置GraphQL与OpenStack一起使用?

时间:2019-02-26 18:01:41

标签: javascript graphql openstack

您如何配置GraphQL在OpenStack上工作?

以下代码在本地工作,但是当我将其移至我的OpenStack实例并尝试打开GraphiQL(GraphQL软件包附带的)时,该站点“拒绝连接”。

const express = require('express');
const graphqlHTTP = require('express-graphql');
const schema = require("./schema");
const root = require("./resolvers");

var app = express();

app.use('/graphql', graphqlHTTP({
  schema: schema,
  rootValue: root,
  graphiql: true,
}));
app.set('port', 3000);
app.listen(app.get('port'));

console.log('Running a GraphQL API server at ' + app.get('port'));

0 个答案:

没有答案