mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-16 22:41:01 +00:00
Restructure the js app (#243)
* prettier * linter * add prettier, and format the code * remove common, merge it with frontend * refactor the app * better lint and code fix * travis for the frontend app * travis build script Signed-off-by: Daniel Maricic <daniel@woss.io> * lint and build * update the README.md Signed-off-by: Daniel Maricic <daniel@woss.io> * change the commands to reflect refactor Signed-off-by: Daniel Maricic <daniel@woss.io> * prettier and tslint are friends Signed-off-by: Daniel Maricic <daniel@woss.io> * code that wasn't linted properly before Signed-off-by: Daniel Maricic <daniel@woss.io> * prettier rc got deleted * workgin on making the travis pass Signed-off-by: Daniel Maricic <daniel@woss.io> * travis build please? Signed-off-by: Daniel Maricic <daniel@woss.io> * update readme.md Signed-off-by: Daniel Maricic <daniel@woss.io> * dockerfile deleted from fronted - out of scope Signed-off-by: Daniel Maricic <daniel@woss.io> * remove Signed-off-by: Daniel Maricic <daniel@woss.io> * tsconfig Signed-off-by: Daniel Maricic <daniel@woss.io> * found the reason why EOL wasn't happening Signed-off-by: Daniel Maricic <daniel@woss.io> * type for the event in the ConnectionInput as suggested * strictnullCheck to true * noImplicitAny * noUnusedParams * AfgHandling * update * fix Location.tsx * Few minor fixes * remove connection input and revert to original * esnext fixes the imports for icons and non default `* as ` * update to the tsconfig.test.json don't use commonjs please * fixed wrong comment for TIMEOUT_BASE * return totem.svg and type decraration of maybe Signed-off-by: Daniel Maricic <daniel@woss.io> Co-authored-by: Will <w.kopp@kigroup.de>
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
# Polkadot Telemetry
|
||||
|
||||
## Getting Started
|
||||
|
||||
To run the backend, you will need `cargo` to build the binary. We recommend using [`rustup`](https://rustup.rs/).
|
||||
|
||||
To run the frontend make sure to grab the latest stable version of node and install dependencies before doing anything:
|
||||
|
||||
```
|
||||
```sh
|
||||
nvm install stable
|
||||
yarn
|
||||
```
|
||||
|
||||
### Terminal 1 - Backend
|
||||
|
||||
```
|
||||
cd backend
|
||||
cargo build --release
|
||||
@@ -20,35 +22,45 @@ cargo build --release
|
||||
By default, telemetry will listen on the local interface only (127.0.0.1) on port 8000. You may change both those values:
|
||||
|
||||
Use another port:
|
||||
|
||||
```
|
||||
PORT=8123 telemetry
|
||||
```
|
||||
|
||||
You may also change the the listening interface. This is especially required if you are using docker:
|
||||
|
||||
```
|
||||
BIND=0.0.0.0 telemetry
|
||||
```
|
||||
|
||||
### Terminal 2 - Frontend
|
||||
```
|
||||
yarn start:frontend
|
||||
|
||||
```sh
|
||||
cd frontend
|
||||
yarn
|
||||
yarn start
|
||||
```
|
||||
|
||||
### Terminal 3 - Node
|
||||
|
||||
Follow up installation instructions from the [Polkadot repo](https://github.com/paritytech/polkadot)
|
||||
|
||||
```
|
||||
```sh
|
||||
./target/release/polkadot --dev --telemetry-url ws://localhost:8000/submit
|
||||
```
|
||||
|
||||
### Run via Docker
|
||||
|
||||
To run via docker make sure that you have Docker Desktop
|
||||
- If you dont you can download for you OS here [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
```
|
||||
|
||||
- If you dont you can download for you OS here [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
```sh
|
||||
docker-compose up --build -d
|
||||
```
|
||||
- -d stands for detach, if you would like to see logs i recommend using [Kitmatic](https://kitematic.com/) or dont use the -d
|
||||
- --build will build the images and rebuild, but this is not required everytime
|
||||
- If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.
|
||||
|
||||
- -d stands for detach, if you would like to see logs i recommend using [Kitmatic](https://kitematic.com/) or don't use the -d
|
||||
- --build will build the images and rebuild, but this is not required every time
|
||||
- If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.
|
||||
|
||||
Now navigate to localhost:3000 in your browser to view the app.
|
||||
|
||||
Reference in New Issue
Block a user