You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated JSON can be deleted after its been copied to `swagger-spec.js`.
13
20
14
21
##Generating Server Stubs
15
22
You can contribute to the syscoin-api project by writing connectors for Syscoin in different languages.
16
23
Swagger-codegen can greatly reduce the time it takes to write connectors in other languages by generating a server-api stub
17
24
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).
18
25
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
+
```
20
29
21
30
We encourage anyone who does this to submit a pull request to have their server API added to the official repo.
22
31
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
27
36
in your preferred language. To generate the Client SDK use the command below replacing LANGUAGE with one of
28
37
the [supported SwaggerJS client values](https://generator.swagger.io/#!/clients/clientOptions).
29
38
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
Copy file name to clipboardExpand all lines: server/nodejs/README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,20 @@
1
1
## 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
+
2
6
To run the server, follow these simple steps:
3
7
4
8
```
5
9
npm install
6
-
npm run start
10
+
SYS_LOCATION=DATALOCATION npm run start
7
11
```
8
12
9
13
## Running the server in daemon mode
10
14
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:
0 commit comments