https://github.com/rumkin/swarm-sites
🐝🐝 Github Pages for Swarm
https://github.com/rumkin/swarm-sites
ethereum-network http javascript server swarm
Last synced: about 1 year ago
JSON representation
🐝🐝 Github Pages for Swarm
- Host: GitHub
- URL: https://github.com/rumkin/swarm-sites
- Owner: rumkin
- Created: 2018-02-14T13:53:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T00:45:44.000Z (almost 8 years ago)
- Last Synced: 2025-01-30T03:26:18.300Z (about 1 year ago)
- Topics: ethereum-network, http, javascript, server, swarm
- Language: JavaScript
- Homepage: http://swarmsites.online
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Swarm Sites
Swarm sites is an http server for serving swarm websites and SPAs requested via
regular DNS by non `.eth` domains. It works like Github Pages but for Swarm.
[](https://buddy.works)
**NOTE!** SwarmSite is in beta.
## Usage
To link your regular domain to Swarm you need to add two DNS Records into DNS
configuration file or management panel:
1. Add `A` record to map requests to SwarmSites IP:
```text
@ 3600 IN A 159.65.169.224
```
2. Add `TXT` record to match hostname with BZZ resource:
```text
@ IN TXT swarm=2018:pre bzz=a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a type=website
```
Record description:
* `swarm=2018:pre` – record version `2018:pre`.
* `bzz=...` - swarm BZZ address
* `type=website` - _optional_ specifies resource type. Currently `website` is
default and the only supported value.
## Install
Install via git:
```bash
git clone https://github.com/rumkin/swarm-sites
cd swarm-sites
npm i .
node cli.js start
```
To run swarm sites with nginx and systemd there is two files with example configuration:
```text
var/swarm-sites.nginx
var/swarm-sites.systemd
```
## TODO
* [ ] HTTPs support:
* [ ] Let's Encrypt certificates generation.
* [ ] Auto renewal.
* [ ] Routing for sites to better support of SPA.
* [ ] Better error pages.
* [ ] Write tests.
* [ ] Add Swarm API mockups for test purposes.
* [x] Custom sites types:
* [x] Website.
* [x] SPA.
## License
MIT.