https://github.com/synonymdev/slashtags-bootstrap-server
https://github.com/synonymdev/slashtags-bootstrap-server
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/synonymdev/slashtags-bootstrap-server
- Owner: synonymdev
- Archived: true
- Created: 2022-07-22T07:41:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T15:18:43.000Z (over 3 years ago)
- Last Synced: 2025-05-18T13:02:02.915Z (11 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slashtags-bootstrap-server
Creates a bootstrapping server for the DHT.
## Setup
Install dependencies
```
npm install
```
Copy `config/default.json` to `config/local.json`.
Updated local.json to define which port the service should listen on.
## Running with PM2
Add the service to PM2
```
pm2 start stack.config.js
```
To reload it after an update...
```
pm2 reload BootstrapDHT
```
or just `node src/index.js`
## Using it
When you know the IP and port (set in config), you can add your server to the list of bootstrapping nodes you use when starting a hyperswarm. For example...
```
import DHT from '@hyperswarm/dht'
import Hyperswarm from 'hyperswarm'
const dht = new DHT({ bootstrap: [':', ''] })
const swarm = new Hyperswarm({ dht })
```