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
Download the ipfs binary from here https://dist.ipfs.io/#go-ipfs
Extract the ipfs binary and run the command ./ipfs daemon.
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
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.
请发表评论