您如何配置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'));