Quick Start
Deploy your first worker in 5 minutes using the Dashboard or the CLI.
1. Create Account
Sign in at openworkers.com with your GitHub account.
2. Create Worker
Click New Worker, enter a name. Your worker will be available at:
https://<name>.workers.rocks 3. Write Code
Replace the default code with:
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const { pathname } = new URL(request.url);
if (pathname === '/api/hello') {
return Response.json({ message: 'Hello, World!' });
}
return new Response('Not Found', { status: 404 });
}
}; 4. Deploy
Click Save. Your worker is live.
Test It
curl https://<name>.workers.rocks/api/hello
# {"message":"Hello, World!"} Next Steps
- Add a KV binding for persistent storage
- Add a database for SQL queries
- Handle scheduled tasks for cron jobs
- CLI Reference for all commands
- Self-host on your own infrastructure