Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.08 KB

File metadata and controls

22 lines (17 loc) · 1.08 KB

chamomile

Chamomile is a bare-minimum clone of the Snap!Cloud server for testing out Snap! forks. It supports listing projects, simulating authentication and password changes, and logging out.

Chamomile does not verify credentials or store any data, so it's not a suitable production replacement for the real Snap!Cloud.

Setting up

Dependencies

Install dependencies: pip3 install uvicorn blacksheep

Running Chamomile

Start up Chamomile: python3 main.py

Hosting Snap!

Host your Snap! fork on localhost with port 8080 using HTTP (if these exact requirements are not met, then Chamomile might reject your client): python3 -m http.server 8080

Telling Snap! about the new cloud server

In your JavaScript console (found under DevTools on Chromium), run this code snippet to tell Snap! where to find the Chamomile server:

Cloud.prototype.determineCloudDomain = function (){return "http://localhost:8000"}; // Patch the cloud domain logic to always use our self-hosted server.
world.children[0].cloud = new Cloud(); // Reconfigure Snap! using our patched Cloud client.