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

webaverse/ipfs-backend

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

开源软件名称:

webaverse/ipfs-backend

开源软件地址:

https://github.com/webaverse/ipfs-backend

开源编程语言:

JavaScript 99.9%

开源软件介绍:

ipfs-backend

Node server hosted on AWS, mainly used for REST endpoints.

Dev Setup

  1. npm install

  2. Create a config.json and paste this in:

{
    "accessKeyId": "<ACCESS_KEY_ID>",
    "secretAccessKey": "<SECRET_ACCESS_KEY>"
}

You can get these credentials from Avaer.

  1. Create a cert/ folder. Create 2 new files inside: fullchain.pem and privkey.pem. Copy the certificates from https://github.com/webaverse/app under the folder certs-local

  2. Download the ipfs binary from here https://dist.ipfs.io/#go-ipfs

  3. Extract the ipfs binary and run the command ./ipfs daemon.

  4. Confirm the output of IPFS

            Swarm announcing /ip4/192.168.18.7/udp/4001/quic
            Swarm announcing /ip6/::1/tcp/4001
            Swarm announcing /ip6/::1/udp/4001/quic
            API server listening on /ip4/127.0.0.1/tcp/5001
            WebUI: http://127.0.0.1:5001/webui
            Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
            Daemon is ready
    
  5. npm run start (forever) or npm run dev.

API Docs

worlds.exokit.org

GET worlds.exokit.org/{worldId}

Returns an object with: Host, World Name and Uptime of server.

POST worlds.exokit.org/create

Returns an object with: Host, World Name and Uptime of server.

DELETE worlds.exokit.org/{worldId}

Terminates the ec2 associated with world.

How to deploy new world-server code.

1.) Make sure your dialog repo changes are commited to the dialog/worlds branch.

2.) Go to world-server repo and bump the package.json version number. (this triggers the GH action to execute and create a new release, it will pull dialog/worlds)

3.) After the GH action is done, copy the hash of the release and paste it into exokit-backend/routes/worlds.js in the updateZipFile() fetch url.

4.) SSH into exokit-backend EC2 server (can get the IP from AWS dashboard), and delete the world-server.zip file. (it exists inside ~/exokit-backend/)

5.) npm run start inside of exokit-backend. (this will start a forever process and start downloading the new ZIP file from the Github release.

6.) After it is done, verify the logs. (sudo forever list, sudo forever logs [index]) The server is up and running and will create new world-servers with the fresh codebase.

P.S. To truly wipe the old servers and start fresh, you need to login to AWS and terminate the old world servers OR you can use the DELETE API for worlds.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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