Commit 4cd9893d authored by 郭志伟's avatar 郭志伟

fix(apollo): 语法调整

parent 78b72dbe
...@@ -4,16 +4,22 @@ const apollo = require('@qg/apollo-nodejs'); ...@@ -4,16 +4,22 @@ const apollo = require('@qg/apollo-nodejs');
"use strict"; "use strict";
const npm = require("npm"); const npm = require("npm");
npm.load(() => { (async function() {
await apollo.load({ npm.load(() => {
appId: 'quantum-blocks', try {
configPath: path.resolve(__dirname, '../config'), await apollo.load({
appId: 'quantum-blocks',
configPath: path.resolve(__dirname, '../config'),
});
} catch (error) {
console.log(error);
}
if (process.env.NODE_ENV === 'production') {
npm.run("start");
} else {
npm.run("test");
}
}); });
if (process.env.NODE_ENV === 'production') { })();
npm.run("start");
} else {
npm.run("test");
}
});
\ 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