diff --git a/src/commands/api-mesh/run.js b/src/commands/api-mesh/run.js index cfd6128..59b2bb6 100644 --- a/src/commands/api-mesh/run.js +++ b/src/commands/api-mesh/run.js @@ -163,7 +163,7 @@ class RunCommand extends Command { } //Generating unique mesh id - meshId = 'testMesh' + meshId = 'testMesh'; await validateMesh(data.meshConfig); await buildMesh(meshId, data.meshConfig); diff --git a/src/index.js b/src/index.js index 3da1a57..feb85a2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,5 @@ export default { - - async runServer(meshPath){ + async runServer(meshPath) { const meshArtifacts = await import(meshPath); const { getBuiltMesh } = meshArtifacts; @@ -10,6 +9,6 @@ export default { // TODO: Access mesh artifact and run yogaServer async fetch(request, env, ctx) { await this.runServer(env.meshPath); - return new Response("Hello World!"); + return new Response('Hello World!'); }, - }; +}; diff --git a/src/server.js b/src/server.js index be49248..dd48239 100644 --- a/src/server.js +++ b/src/server.js @@ -93,26 +93,26 @@ const getYogaServer = async () => { meshConfig = readMeshConfig(meshId); const serverPath = `${__dirname}/index.js`; - + const command = `./node_modules/.bin/wrangler dev ${serverPath} --port 8788 --inspector-port 9788 --var meshPath:${meshArtifactsPath}`; const server = exec(command); server.stdout.on('data', data => { console.log(data); }); - + server.stderr.on('data', data => { console.error(data); }); - + server.on('close', code => { console.log(`Server closed with code ${code}`); }); - + server.on('exit', code => { console.log(`Server exited with code ${code}`); }); - + server.on('error', err => { console.error(`Server exited with error ${err}`); });