File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,13 +11,16 @@ const LANGUAGE_VERSIONS = {
1111 javascript : [ '10.x' , '10.x/babel' ]
1212}
1313
14- const GRAPH_API = process . env . GRAPH_API || "http://localhost:3040/graphql" ;
14+ const BUILDER_PORT = process . env . BUILDER_PORT || 3040 ;
15+
16+ const GRAPH_API = process . env . GRAPH_API || `http://localhost:${ BUILDER_PORT } /graphql` ;
1517
1618const RUN_URL = process . env . RUN_URL || "https://relayer-staging.chainshot.com/run/" ;
1719
1820module . exports = {
1921 LANGUAGE_VERSIONS ,
2022 EXECUTION_RESULTS ,
23+ BUILDER_PORT ,
2124 GRAPH_API ,
2225 RUN_URL ,
2326}
Original file line number Diff line number Diff line change 11const childProcess = require ( "child_process" ) ;
22const path = require ( "path" ) ;
3+ const { BUILDER_PORT } = require ( './config' ) ;
34const serverPath = path . join ( __dirname , ".." , "server" ) ;
45
56function startServer ( ) {
67 return new Promise ( ( resolve , reject ) => {
78 const npmChild = childProcess . exec ( "npm i" , { cwd : serverPath } ) ;
89 npmChild . on ( "exit" , ( ) => {
910 const child = childProcess . fork ( 'src/index' , [ ] , {
10- CONTENT_PATH : process . env . contentPath ,
11- CONTENT_REPO_NAME : process . env . contentRepoName ,
1211 cwd : serverPath ,
1312 detached : true ,
1413 silent : false ,
15- env : { QUERY_ONLY : true }
14+ env : {
15+ CONTENT_PATH : process . env . CONTENT_PATH ,
16+ CONTENT_REPO_NAME : process . env . CONTENT_REPO_NAME ,
17+ QUERY_ONLY : true ,
18+ PORT : BUILDER_PORT
19+ }
1620 } ) ;
1721 child . on ( 'message' , ( msg ) => {
1822 if ( msg === "started" ) {
You can’t perform that action at this time.
0 commit comments