puter.workers.list()

Websites Puter Apps Node.js Workers

Lists all workers in your account with their details.

Syntax

puter.workers.list()

Parameters

None.

Return Value

A Promise that resolves to a WorkerInfo array with each worker's information.

Examples

List all workers

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        (async () => {
            // List all workers
            const workers = await puter.workers.list();
            puter.print(`You have ${workers.length} worker(s):<br>`);
            workers.forEach(worker => {
                puter.print(`- ${worker.name} (${worker.url})<br>`);
            });
        })();
    </script>
</body>
</html>