Skip to content

Commit 2493436

Browse files
committed
Fix README instructions and npm scripts
1 parent 12d2338 commit 2493436

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed

.idea/runConfigurations/Start_Bridge_Microservice.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
# swirlds-json-rpc-bridge
1+
# swirlds-json-rpc-bridge
2+
3+
# Building
4+
5+
### Pre-requirements
6+
7+
You must have installed npm (version 16) and npm.
8+
9+
### Steps
10+
11+
From the root of the project workspace:
12+
13+
1. Run `npm install`. This will create and populate `node_modules`.
14+
2. Run `npm run setup`. This will link the `node_modules` to the packages, and the packages together.
15+
3. Run `npm run build`. This will clean and compile the bridge library and the server.
16+
4. Run `npm run start`. This will start the server on port `7546`.
17+
18+
Alternatively, after `npm run setup`, from within the IDE, you should see the `Start Bridge Microservice`
19+
run configuration. You should be able to just run that configuration, and it should start the server
20+
on port `7546`.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
]
1111
},
1212
"scripts": {
13+
"setup": "npx lerna bootstrap --hoist",
14+
"build": "npx lerna run build",
15+
"clean": "npx lerna run clean",
1316
"compile": "npx lerna run compile",
14-
"start": "lerna exec --scope @workspace/app -- yarn start",
15-
"test": "lerna run test --since",
16-
"new-version": "lerna version --conventional-commits --yes",
17-
"diff": "lerna diff"
17+
"start": "npx lerna exec --scope server -- npm run start"
1818
}
1919
}

packages/bridge/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"build": "npm run clean && npm run compile",
16-
"clean": "rm -rf ./dist && rom -rf tsconfig.tsbuildinfo",
17-
"compile": "npx tsc -b tsconfig.json"
16+
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
17+
"compile": "../../node_modules/typescript/bin/tsc -b tsconfig.json"
1818
}
1919
}

packages/server/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
},
2525
"scripts": {
2626
"build": "npm run clean && npm run compile",
27-
"clean": "rm -rf ./dist && rom -rf tsconfig.tsbuildinfo",
28-
"compile": "npx tsc -b tsconfig.json"
27+
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
28+
"compile": "../../node_modules/typescript/bin/tsc -b tsconfig.json",
29+
"start": "NODE_PATH=../../node_modules node dist/index.js"
2930
}
3031
}

0 commit comments

Comments
 (0)