0.6.4 • Published 2 years ago

@functionland/box v0.6.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

comment: <> (Contributors)

comment: <> (Forks)

comment: <> (Stargazers)

comment: <> (Issues)

comment: <> (License)

comment: <> (LinkedIn)

comment: <> ()

comment: <> ()

comment: <> ( )

[comment]: <> ( )

[comment]: <> ( )

comment: <> ( View Demo)

comment: <> ( ·)

comment: <> ( Report Bug)

comment: <> ( ·)

comment: <> ( Request Feature)

comment: <> ( Contact)

comment: <> ( Acknowledgments)

Built With

Getting Started

Use Server with caution and know the risk's becuse we are at development stage and the identity and encription is not avalibale so you become public node that can accessed from anywhere.

Option 1

By cloning repo and using rush (our monorepo manager) to build and run it.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • rush
    npm install -g @microsoft/rush
  • node 16

Installation

  1. Clone the repo
    git clone https://github.com/functionland/fula.git
  2. Install dependencies packages and build
    rush update
    rush build --to box

Usage

Enter Server folder and start server

cd apps/box 
rushx start

Option 2

Using npm

Installation

  1. Install it globally
npm install -g @functionland/box
  1. Create directory for its data and config
mkdir -p /opt/box
cd /opt/box
  1. Create config folder and create default.json
cd /opt/box
mkdir config
touch config/default.json

And copy this config into it.

{
  "nodes": [],
  "network":{
    "key_path": "",
    "listen": [
      "/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star",
      "/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star"
    ]
  },
  "ipfs": {
    "http": ""
  }
}

Usage

cd /opt/box
npx @functionland/box

Config

###Overview

{
  "nodes": [], # List of multiaddresses of other box and ipfs node in your network.  
  "network":{
    "key_path": "", # Path to secret-key file
    "listen": [
      "/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star",
      "/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star"
    ] # List of multiaddresses libp2p and ipfs listen on
  },

}

Private Fula network

To have a private network without exposing your private data to public ipfs First create a key file: 1. bash-script

  cd /opt/box/config
  echo -e "/key/swarm/psk/1.0.0/\n/base16/\n`tr -dc 'a-f0-9' < /dev/urandom | head -c64`" > swarm.key
  1. using go ipfs-swarm-key-gen
  2. using node ipfs-swarm-key-gen

After creating the key file open configuration and add path to it in config

{
  ...
  "network":{
    "key_path": "./config/swarm.key", # Path to secret-key file
    ...
  },
  ...
}

After adding this you have to add other network node multiaddresses manually for your network to join.

{
  ...
  "nodes": [] # List of multiaddresses of other box and ipfs node in your network.
  ...
}

External IPFS

If you want to use an external ipfs like go-ipfs or ipfs-cluster proxy api set Http RPC api of your external node:

{
  ...,
  "ipfs": {
    "http": "" # external ipfs or ipfs-cluster proxy to use instead of js-ipfs
  }
  ...
}

For more examples, please refer to the Documentation

Roadmap

  • Protocols
    • File
    • Graphql

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

See LICENSE for more information.

comment: <> ()

comment: <> (## Contact)

comment: <> (Your Name - @twitter_handle(https://twitter.com/twitter_handle); - email@email_client.com)

comment: <> (Project Link: https://github.com/github_username/repo_name(https://github.com/github_username/repo_name))

comment: <> ((back to top))

comment: <> ()

comment: <> (## Acknowledgments)

comment: <> (* []())

comment: <> (* []())

comment: <> (* []())

comment: <> ((back to top))