• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

christroutner/koa-ipfs-blog: Serving a static website published to the IPFS netw ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

christroutner/koa-ipfs-blog

开源软件地址:

https://github.com/christroutner/koa-ipfs-blog

开源编程语言:

JavaScript 84.5%

开源软件介绍:

koa-ipfs-blog

Greenkeeper badge

A light-weight web server that serves any website published to IPFS. It monitors a BCH address and automatically updates when new content is announced by that address.

This is the server-side software that serves up content to users with a normal web browser. It works in conjunction with the memo-push publishing tool. Memo-push is used to announce new content via the BCH network. This software is used to retrieve that new content from the IPFS network and serve it to users. Future versions will also serve content directly to the Tor network as well, via a hidden service.

This project was forked from the koa-api-boilerplate

Requirements

  • node ^10.15.1
  • npm ^6.7.0

Installation

  • Clone and install dependencies:
git clone https://github.com/christroutner/koa-ipfs-blog
cd koa-ipfs-blog
npm install
  • Install IPFS and ensure the daemon is running by executing ipfs daemon.

Usage

There are two forms of using this repository. Development is best for hacking and development of the server. Production packages the repository into a Docker container for easy deployment. It also adds a Tor docker container so that your website content can be accessed directly through Tor and the Tor browser.

Development

  • Ensure the IPFS daemon is running.

  • Add your BCH address to the config file. This should be the same address associated with your memo.cash profile.

  • Start the server: npm start

Production

It's assumed that you are starting with a fresh installation of Ubuntu 18.04 LTS on a 64-bit machine. It's also assumed that you are installing as a non-root user with sudo privileges.

  • Install Docker on the host system. This tutorial shows how to install Docker on a Ubuntu system. It's specifically targeted to Digital Ocean's cloud servers, but should work for any Ubuntnu system.

  • Install Docker Compose too. This tutorial shows how to do so on a Ubuntu system.

  • Add your BCH address to the production/common.js file. This should be the same address associated with your memo.cash profile.

  • Build the image: docker-compose build

  • Run the docker container: docker-compose up

  • Or, run the docker container in daemon mode: docker-compose up -d

Note: It takes time for the container to crawl the IPFS peer-to-peer network and connect to peers, in order to find the initial content it wants to download. You can speed up this processes by pre-downloading the initial content into the ipfs-data directory. If working regularly with this software, consider forking this ipfs-stay-connected app to make uploading of IPFS content faster.

Note: Your website will be able to be accessed directly over the Tor network. The .onion address for your website can be found in keys/koa/hostname.

IPFS

v1.1.3 uploaded to IPFS:

  • Get it: ipfs get QmULHyBTAHQxT9Rnd6n7bfnXCDFdcHtZQKM4Jn1JsSteUG
  • Pin it: ipfs pin add -r QmULHyBTAHQxT9Rnd6n7bfnXCDFdcHtZQKM4Jn1JsSteUG

License

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ipfs-inactive/connections-globe: [ARCHIVED] An interactive globe to view all you ...发布时间:2022-06-22
下一篇:
RTradeLtd/rtfs: 发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap