Commit fdbed14b authored by 郭志伟's avatar 郭志伟

fix(server): 调试apollo

parent 4cd9893d
...@@ -17,6 +17,7 @@ app/**/*.js ...@@ -17,6 +17,7 @@ app/**/*.js
config/plugin.local.js config/plugin.local.js
config/plugin.js config/plugin.js
config/config.*.js config/config.*.js
config/apollo.json
index.js index.js
config/manifest.json config/manifest.json
app/view/* app/view/*
......
...@@ -4,22 +4,15 @@ const apollo = require('@qg/apollo-nodejs'); ...@@ -4,22 +4,15 @@ const apollo = require('@qg/apollo-nodejs');
"use strict"; "use strict";
const npm = require("npm"); const npm = require("npm");
(async function() { npm.load(() => {
npm.load(() => { apollo.load({
try { appId: 'quantum-blocks',
await apollo.load({ configPath: path.resolve(__dirname, '../config'),
appId: 'quantum-blocks', }).then(() => {
configPath: path.resolve(__dirname, '../config'),
});
} catch (error) {
console.log(error);
}
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
npm.run("start"); npm.run("start");
} else { } else {
npm.run("test"); npm.run("test");
} }
}); });
})(); });
\ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment