Skip to content

Commit cfe9a2f

Browse files
committed
Cleanup of READMEs prior to tag
1 parent 88e582a commit cfe9a2f

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22

33
To generate the API first download [swagger-codegen](https://github.com/swagger-api/swagger-codegen) and build it. After its built, create an alias:
44

5-
`alias swagger-codegen='java -jar [/path/to/built/swagger-codegen]/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar'`
5+
```
6+
alias swagger-codegen='java -jar [/path/to/built/swagger-codegen]/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar'
7+
```
68

79
##Generating the JSON Spec
810
Anytime the root swagger.yaml is modified the JSON spec should be updated and copied into
911
`swagger-ui/dist/swagger-spec.js` as the value for the `swaggerSpec` var. Currently this is a manual process.
1012

11-
To regenerate the JSON API spec due to YAML changes (required for docs UI to be accurate): `generate -i swagger.yaml -o ./generated-json -l swagger`.
13+
To regenerate the JSON API spec due to YAML changes (required for docs UI to be accurate):
14+
15+
```
16+
generate -i swagger.yaml -o ./generated-json -l swagger
17+
```
18+
1219
The generated JSON can be deleted after its been copied to `swagger-spec.js`.
1320

1421
##Generating Server Stubs
1522
You can contribute to the syscoin-api project by writing connectors for Syscoin in different languages.
1623
Swagger-codegen can greatly reduce the time it takes to write connectors in other languages by generating a server-api stub
1724
in the desired language. To generate the Server stub use the command below replacing LANGUAGE with one of the [supported SwaggerJS server values](https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO).
1825

19-
To build the server SDK stub: `swagger-codegen generate -i swagger.yaml -o ./server/generated-server -l LANGUAGE`
26+
```
27+
swagger-codegen generate -i swagger.yaml -o ./server/generated-server -l LANGUAGE
28+
```
2029

2130
We encourage anyone who does this to submit a pull request to have their server API added to the official repo.
2231
Package your server API using folder names mirroring the swagger language name, ie: 'nodejs-server'. Client API's can also be submitted using the same \
@@ -27,4 +36,6 @@ To quickly start communicating with an instance of the Syscoin API server simply
2736
in your preferred language. To generate the Client SDK use the command below replacing LANGUAGE with one of
2837
the [supported SwaggerJS client values](https://generator.swagger.io/#!/clients/clientOptions).
2938

30-
To build the client: `swagger-codegen generate -i swagger.yaml -o ./client/generated-client -l LANGUAGE`
39+
```
40+
swagger-codegen generate -i swagger.yaml -o ./client/generated-client -l LANGUAGE
41+
```

server/nodejs/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
## Running the server
2+
Prior to running the server a Syscoin node must be installed and properly configured as a JSON-RPC server. After being configured the syscoin-api server
3+
needs to know the location of syscoin.conf using the `SYS_LOCATION` environmental variable, replacing DATALOCATION in the examples below
4+
with the path to your Syscoin data directory, including the trailing slash.
5+
26
To run the server, follow these simple steps:
37

48
```
59
npm install
6-
npm run start
10+
SYS_LOCATION=DATALOCATION npm run start
711
```
812

913
## Running the server in daemon mode
1014
Running the server in daemon mode is dependent on [pm2](https://www.npmjs.com/package/pm2). To run the server as a daemon use the below command after `npm install` completes:
1115

1216
```
13-
npm run startd
17+
SYS_LOCATION=DATALOCATION npm run startd
1418
```
1519

1620
## Configuring for Production Use

0 commit comments

Comments
 (0)