From b0960bde867c9ff9e9fd4092452dcec704a699c8 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Tue, 3 Sep 2019 09:03:59 +0100 Subject: [PATCH] Updated README with installation docs --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 08795df75..4ce4e3fa7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,40 @@ - NodeJS version 8 or 9 - [yarn][yarn] dependency manager +- [catapult-server][catapult-server] configured as an [API node][api-node]. + +## Installation + +1. Edit ``rest/resources/rest.json`` configuration: + +| Parameter | Description | Example | +|-|-|-| +| clientPrivateKey | REST client private key. | 000...000| +| db.url | MongoDB [connection URL](https://github.com/nemtech/catapult-server/blob/master/resources/config-database.properties#L3). | mongodb://localhost:27017/ | +| apiNode.host | API node connection host. | 127.0.0.1 | +| apiNode.port | API node [connection port](https://github.com/nemtech/catapult-server/blob/master/resources/config-node.properties#L3). | 7900 | +|api.publicKey | API node [public key](https://github.com/nemtech/catapult-server/blob/master/resources/config-user.properties#L4). | FFFF...FFF| +| websocket.mq.host | ZeroMQ connection host. | 127.0.0.1 | +| websocket.mq.port | ZeroMQ [connection port](https://github.com/nemtech/catapult-server/blob/master/resources/config-messaging.properties#L3). | 7902 | + +> **Note:** catapult-rest has to reach the API node, ZeroMQ and MongoDB ports. If you are running catapult-server on a VPS, you can bind the ports to your local development environment creating an **SSH tunnel**: ``ssh -L 27017:localhost:27017 -L 7900:localhost:7900 -L 7902:localhost:7902 -p 2357 @`` + +2. Install the project's dependencies: + +``` +./yarn_setup.sh +``` + +3. Run catapult-rest: + +``` +cd rest +yarn start resources/rest.json +``` + +## Contributing + +Before contributing please [read this](CONTRIBUTING.md). ## License @@ -14,3 +48,5 @@ Copyright (c) 2018 Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp Licensed u [yarn]: https://yarnpkg.com/lang/en/ +[catapult-server]: https://yarnpkg.com/lang/en/ +[api-node]: https://nemtech.github.io/server.html#installation