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

fix(server): 调试apollo

parent 4cd9893d
......@@ -17,6 +17,7 @@ app/**/*.js
config/plugin.local.js
config/plugin.js
config/config.*.js
config/apollo.json
index.js
config/manifest.json
app/view/*
......
......@@ -4,22 +4,15 @@ const apollo = require('@qg/apollo-nodejs');
"use strict";
const npm = require("npm");
(async function() {
npm.load(() => {
try {
await apollo.load({
appId: 'quantum-blocks',
configPath: path.resolve(__dirname, '../config'),
});
} catch (error) {
console.log(error);
}
npm.load(() => {
apollo.load({
appId: 'quantum-blocks',
configPath: path.resolve(__dirname, '../config'),
}).then(() => {
if (process.env.NODE_ENV === 'production') {
npm.run("start");
} else {
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