Skip to content

Commit 8be6518

Browse files
author
Ruslan Molchanov
committed
Merge branch 'update-readme' into 'master'
Update readme See merge request open-platform/api!92
2 parents 0859c6f + 3912ddc commit 8be6518

1 file changed

Lines changed: 32 additions & 35 deletions

File tree

README.md

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,66 @@ Documentation is available at https://docs.openfuture.io.
1414
## Running the application
1515

1616
### Environment Variables
17-
The OPEN Platform API uses several environment variables. All
18-
variables are required.
17+
The OPEN Platform API uses several environment variables. All variables are required.
1918

2019
#### Google service
2120

2221
* `GOOGLE_CLIENT_ID`
2322
* `GOOGLE_CLIENT_SECRET`
2423

25-
This environment variables is required for app to use OAuth 2.0.
26-
To get started using Gmail API, you need to first use the
27-
[setup tool](https://console.developers.google.com/flows/enableapi?apiid=gmail&credential=client_key&pli=1),
28-
which guides you through creating a project in the Google API Console,
29-
enabling the API, and creating credentials.
24+
These environment variables are required for your app to utilize OAuth 2.0. To get started using the Gmail API, you need to first use the [setup tool](https://console.developers.google.com/flows/enableapi?apiid=gmail&credential=client_key&pli=1), to register your application for the Gmail API in the Google API Console. The setup tool will guide you through creating a project in the Google API Console, enabling the API, and creating authentication credentials. The setup process is easy and consists of the following three basic steps:
3025

31-
1. From the Credentials page, click **Create credentials >
32-
OAuth client ID** to create your OAuth 2.0 credentials or
33-
**Create credentials > Service account key** to create a service account.
34-
2. If you created an OAuth client ID, then select your application type.
35-
3. Fill in the form and click **Create**.
26+
1. On the Credentials page, click **My Project** and select the project you want to use.
27+
2. If you plan to create an **OAuth client ID**, click on the **OAuth consent screen** tab at the top of the **Credentials** page and fill out the form. You will need it in step 5.
28+
3. Click on the **Credentials** tab at the top of the **Credentials** page.
29+
4. Click the **Create credentials** button. From the drop-down list, select **OAuth client ID** if you want to create OAuth 2.0 credentials or select **Service account key** to create a service account.
30+
5. If you chose to create an **OAuth client ID**, select your application type (e.g. Web application, iOS app, etc.). Otherwise, go to step 6.
31+
6. Fill out the form and click the **Create** button.
3632

37-
Your application's client IDs and service account keys are now listed on the Credentials page. For details, click a client ID; parameters vary depending on the ID type, but might include email address, client secret, JavaScript origins, or redirect URIs.
33+
Your application's client IDs and service account keys are now listed on the **Credentials** page. You can click on the client ID to see the details for this account. Depending on the type of ID you created, you may see your email address, the client secret key, JavaScript origins, or the redirect URIs. Add the required information to your **GOOGLE_CLIENT_ID** and **GOOGLE_CLIENT_SECRET** environment variables.
3834

3935
#### PostgresSQL service
4036

4137
* `POSTGRES_HOST`
4238

43-
The hostname is installed in order to be able to integrate the
44-
app with the database service.
39+
Configure the **POSTGRES_HOST** environment variable to point to the host where you are running your PostgresSQL server. This is required to connect your application to the database.
4540

4641
* `POSTGRES_DB`
4742

48-
This environment variable need be used to define name for the database.
43+
Add the name of your PostgreSQL database to the **POSTGRES_DB** environment variable. This lets the application know which database to connect to.
4944

50-
* `POSTGRES_USER`
45+
* `POSTGRES_USER` & `POSTGRES_PASSWORD`
5146

52-
This environment variable is used in conjunction with
53-
*POSTGRES_PASSWORD* to set a user and its password. This variable will
54-
create the specified user with superuser power.
47+
Set the **POSTGRES_USER** environment variable with the username you want to use to connect to the database. Set the **POSTGRES_PASSWORD** environment variable that user's password. Using environment variables to configure user authentication to your database is more secure than placing this configuration in your code. **NOTE:** The user you specify in these two environment variables should be a superuser, otherwise you will run into problems.
5548

56-
* `POSTGRES_PASSWORD`
49+
#### Ethereum client service
5750

58-
This environment variable needs for you to use the PostgreSQL database.
59-
This environment variable sets the superuser password for
60-
PostgreSQL.
51+
In order to begin working with the Ethereum blockchain you will need to install a client, such as [Parity](https://github.com/paritytech/parity) or [Geth](https://geth.ethereum.org/downloads/). Here is a brief description of the advantages of each:
6152

62-
#### Ethereum client service
53+
##### Parity
54+
* Written in Rust.
55+
* Includes a pruning algorithm to prevent hard drive usage from growing exponentially.
56+
* Includes an easy-to-use browser-based GUI.
57+
* Implements passive-mode, which reduces the load on your CPU and network.
58+
* Warp sync allows you to sync your node from scratch in a matter of hours, as opposed to days.
59+
* Uses the Kovan test network to help you test your application.
60+
* More feature-complete than Geth.
61+
62+
##### Geth
63+
* Written in Go.
64+
* Considered to be the reference implementation of Ethereum.
65+
* Uses the Rinkeby test network to help you test your application.
6366

64-
In order to begin to work with Ethereum blockchain you need to install
65-
client service on any work machine.
67+
**NOTE:** Both Parity and Geth can be installed on macOS via Homebrew. Ubuntu users can install Parity via apt. Please check to see if binary packages are available for your OS.
6668

6769
* `INFURA_URL`
6870

69-
The INFURA_URL is address your work machine with port your client
70-
service.
71+
The INFURA_URL environment variable should be set to the IP address of your local machine and should include the port the service is running on. For example, `http://10.150.0.4:8545`
7172

7273
* `ETHEREUM_PRIVATE_KEY`
7374

74-
In order to use Ethereum blockchain you need to create **wallet**, where
75-
the private key will be generated. The private key needs in order to
76-
app can work on behalf of your wallet.
75+
In order to use the Ethereum blockchain you need to create a **wallet**. A private key will be created as part of the wallet-creation process. You will need to include your private key in the **ETHEREUM_PRIVATE_KEY** environment variable in order for the system to be able to communicate with your wallet.
7776

7877
* `OPEN_TOKEN_ADDRESS`
7978

80-
Before working in the app you need to create **smart contract** in
81-
Ethereum blockchain. After creating you get *OPEN_TOKEN_ADDRESS*.
82-
With which app can check the transfers of clients.
79+
Before working in the app you need to create a **smart contract** within Ethereum. After creating a **smart contract**, you will receive an **OPEN_TOKEN_ADDRESS**. You will need to set the **OPEN_TOKEN_ADDRESS** to include this token in order for the system to check client transfers.

0 commit comments

Comments
 (0)