mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-21 21:48:02 +00:00
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* experimental Cloudflare Workers for Platforms support * add support for the puter driver * stop hardcoding api.puter.localhost * support destroy from express route as well * initial worker support * xhrshim + fixes (incomplete) * change order of readyState + load event * remove some debug logs * change worker/puterUtils into a cjs module * Cloudflare workers eventtarget workaround * worker preamble webpack * edit worker readme to reflect reality * allow a way to code in api endpoint instead of hardcoding it to api.puter.com * move cloudflare eventtarget fix to puter-portable template This is so it gets run before the rest of puter-js initializes * remove express route for worker
Puter.js
The official JavaScript SDK for Puter.com. Cloud and AI features right from your frontend code!
« LIVE DEMO »
Docs
·
Puter.com
·
Discord
·
Reddit
·
X (Twitter)
Example
Make sure the development server is running.
<html>
<body>
<script src="http://puter.localhost:4100/sdk/puter.dev.js"></script>
<script>
// Loading ...
puter.print(`Loading...`);
// Chat with GPT-3.5 Turbo
puter.ai.chat(`What color was Napoleon's white horse?`).then((response) => {
puter.print(response);
});
</script>
</body>
</html>