2021-09-27 19:11:35 +00:00
# Fluence JS
2020-12-28 14:39:06 +00:00
2021-01-29 13:48:27 +00:00
[![npm ](https://img.shields.io/npm/v/@fluencelabs/fluence )](https://www.npmjs.com/package/@fluencelabs/fluence)
2020-12-28 14:39:06 +00:00
2021-09-27 19:11:35 +00:00
Official TypeScript implementation of the Fluence Peer.
2021-01-29 13:48:27 +00:00
## Getting started
2022-10-26 08:45:31 +00:00
To start developing applications with Fluence JS refer to the official [documentation ](https://fluence.dev/docs/build/fluence-js/ )
2020-05-14 12:20:39 +00:00
2021-09-08 09:42:30 +00:00
## Contributing
2021-01-29 13:48:27 +00:00
2021-09-08 09:42:30 +00:00
While the project is still in the early stages of development, you are welcome to track progress and contribute. As the project is undergoing rapid changes, interested contributors should contact the team before embarking on larger pieces of work. All contributors should consult with and agree to our [basic contributing rules ](CONTRIBUTING.md ).
2021-01-29 13:48:27 +00:00
2021-09-08 09:42:30 +00:00
### Setting up dev environment
2021-01-29 13:48:27 +00:00
2022-08-24 15:03:06 +00:00
Fluence JS uses pnpm to manage monorepo packages. See [pnpm.io ](https://pnpm.io/installation ) for installation instructions.
Install dependencies
2021-01-29 13:48:27 +00:00
```bash
2022-08-24 15:03:06 +00:00
pnpm install
```
Build all packages
2021-01-29 13:48:27 +00:00
```
2022-08-24 15:03:06 +00:00
pnpm -r build
```
2021-01-29 13:48:27 +00:00
### Running tests
2021-02-25 12:33:37 +00:00
Tests are split into unit and integration categories. By default integration tests require a locally running Fluence node with 4310 port open for ws connections. The dependency can be started with docker
2021-01-29 13:48:27 +00:00
```bash
2021-12-17 14:19:43 +00:00
docker run --rm -e RUST_LOG="info" -p 1210:1210 -p 4310:4310 fluencelabs/fluence -t 1210 -w 4310 -k gKdiCSUr1TFGFEgu2t8Ch1XEUsrN5A2UfBLjSZvfci9SPR3NvZpACfcpPGC3eY4zma1pk7UvYv5zb1VjvPHwCjj
2021-02-25 12:33:37 +00:00
```
2022-08-24 15:03:06 +00:00
To run all tests
2021-02-25 12:33:37 +00:00
```bash
2022-08-24 15:03:06 +00:00
pnpm -r test
2021-02-25 12:33:37 +00:00
```
To run only unit tests
```bash
2022-08-24 15:03:06 +00:00
pnpm -r test:unit
2021-02-25 12:33:37 +00:00
```
To run only integration tests
```bash
2022-08-24 15:03:06 +00:00
pnpm -r test:integration
2021-01-29 13:48:27 +00:00
```
## License
2021-01-29 13:57:41 +00:00
[Apache 2.0 ](LICENSE )