{"id":15723332,"url":"https://github.com/sapphicmoe/status-worker","last_synced_at":"2025-05-13T04:34:31.750Z","repository":{"id":215625177,"uuid":"739331474","full_name":"SapphicMoe/status-worker","owner":"SapphicMoe","description":"🌠 Display your current status to others with Cloudflare Workers!","archived":false,"fork":false,"pushed_at":"2024-01-10T21:52:31.000Z","size":26,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T06:27:40.541Z","etag":null,"topics":["cloudflare","cloudflare-worker","cloudflare-workers","hono","honojs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SapphicMoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-05T10:05:24.000Z","updated_at":"2024-03-18T22:34:42.000Z","dependencies_parsed_at":"2024-01-10T22:57:17.373Z","dependency_job_id":null,"html_url":"https://github.com/SapphicMoe/status-worker","commit_stats":null,"previous_names":["solelychloe/status-worker","sapphicmoe/status-worker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphicMoe%2Fstatus-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphicMoe%2Fstatus-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphicMoe%2Fstatus-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SapphicMoe%2Fstatus-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SapphicMoe","download_url":"https://codeload.github.com/SapphicMoe/status-worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877356,"owners_count":21977633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cloudflare-worker","cloudflare-workers","hono","honojs"],"created_at":"2024-10-03T22:11:14.451Z","updated_at":"2025-05-13T04:34:31.727Z","avatar_url":"https://github.com/SapphicMoe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# status-worker\n\nA simple service for Cloudflare Workers that allows you to display your current status to others with ease!\n\n## Deploy\n\nWrangler 3 is required, though `pnpm` commands should automatically take care of that for you.\n\nRun these commands in their respective order:\n\n- `pnpm install`\n- `pnpm addsecret`\n- `pnpm createkv`\n- `pnpm deploy`\n\nTo deploy to your Cloudflare Workers account, edit the entries in the `wrangler.toml` file.  \nThen, add a secret using `wrangler secret put STATUS_SECRET`, and deploy via `pnpm deploy`.\n\n## Debugging\n\nIf you want to debug `status-worker`, you can run `pnpm dev`. This will summon a local instance of the project.\n\nTo change the secrets in the local instance, rename the `.dev.vars.example` file to `.dev.vars` and edit `STATUS_SECRET` to your custom defined secret.\n\n## Usage\n\nOnce you deploy `status-worker` to Cloudflare Workers, it should be relatively straightforward to use the API.\n\n### Creating a status\n\nTo create a status, send a `POST` request to `/` with the following options:\n\n- `Authorization`: This is the secret you defined when running `pnpm addsecret`.\n- `Content-Type`: `application/json`\n- Body data:\n  - `title`: The title of your status.\n  - `body`: The content of your status.\n\nFor example:\n\n```bash\nlily@sapphic-angels:~$ curl -X POST \\\n  -H \"Authorization: mysecret\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Status title\", \"body\": \"Status content\"}' \\\n  https://status.example.com\n```\n```json\n{\n  \"message\": \"Successfully created a new status.\",\n  \"status\": {\n    \"id\": \"3c523f18-f20c-48df-acba-b330f11e66da\",\n    \"title\": \"Status title\",\n    \"body\": \"Status content\",\n    \"date\": \"2024-01-05T12:16:55.479Z\"\n  }\n}\n```\n\n**Note**:\nOn Windows, you might encounter issues with the command prompt interpreting certain characters. To resolve this, use double quotes around the JSON data. (ex. `\"{\\\"title\\\": \\\"Status title\\\", \\\"body\\\": \\\"Status content\\\"}\"`)\n\n### Viewing a status\n\nTo view your latest status, send a `GET` request to `/`.\n\n```bash\nlily@sapphic-angels:~$ curl https://status.example.com/\n```\n```json\n{\n  \"status\": {\n    \"id\": \"3c523f18-f20c-48df-acba-b330f11e66da\",\n    \"title\": \"Status title\",\n    \"body\": \"Status content\",\n    \"date\": \"2024-01-05T12:16:55.479Z\"\n  }\n}\n```\n\nTo view a specific status, send a `GET` request to that specific ID.\n\n```bash\nlily@sapphic-angels:~$ curl https://status.example.com/5250f13c-fa8a-458c-b09b-8523d86d5428\n```\n```json\n{\n  \"status\": {\n    \"id\": \"5250f13c-fa8a-458c-b09b-8523d86d5428\",\n    \"title\": \"Example\",\n    \"body\": \"test test\",\n    \"date\": \"2024-01-05T12:17:05.118Z\"\n  }\n}\n```\n\nTo view all created statuses, send a `GET` request to `/list`.\n\n```bash\nlily@sapphic-angels:~$ curl https://status.example.com/list\n```\n```json\n{\n  \"statuses\": [\n    {\n      \"id\": \"3c523f18-f20c-48df-acba-b330f11e66da\",\n      \"title\": \"meow\",\n      \"body\": \"curl test 2\",\n      \"date\": \"2024-01-05T12:16:55.479Z\"\n    },\n    {\n      \"id\": \"b872946c-10d9-4942-8194-0ed65aaa420f\",\n      \"title\": \"meow\",\n      \"body\": \"curl test 3\",\n      \"date\": \"2024-01-05T12:22:01.292Z\"\n    }\n  ]\n}\n```\n\n### Updating a status\n\nTo update a specific status, send a `PUT` request to that specific status ID.\n\n```bash\nlily@sapphic-angels:~$ curl -X PUT \\\n  -H \"Authorization: mysecret\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\": \"Updated status title\", \"body\": \"Updated status content\"}' \\\n  https://status.example.com/3c523f18-f20c-48df-acba-b330f11e66da\n```\n```json\n{\n  \"message\": \"Status updated successfully.\",\n  \"status\": {\n    \"id\": \"3c523f18-f20c-48df-acba-b330f11e66da\",\n    \"title\": \"Old status title\",\n    \"body\": \"Old status content\",\n    \"date\": \"2024-01-05T12:16:55.479Z\"\n  }\n}\n```\n\n### Deleting a status\n\nTo delete a specific status, send a `DELETE` request to that specific status ID.\n\n```bash\nlily@sapphic-angels:~$ curl -X DELETE \\\n  -H \"Authorization: mysecret\" \\\n  https://status.example.com/3c523f18-f20c-48df-acba-b330f11e66da\n```\n```json\n{\n  \"message\": \"Status deleted successfully.\",\n  \"status\": {\n    \"id\": \"3c523f18-f20c-48df-acba-b330f11e66da\",\n    \"title\": \"Status title\",\n    \"body\": \"Status content\",\n    \"date\": \"2024-01-05T12:16:55.479Z\"\n  }\n}\n```\n\n## Credits\n\nSome of the code for this project has been borrowed from Erisa's **[worker-links](https://github.com/Erisa/worker-links)** project.\n\nI encourage you to check it out!\n\n## License\n\n\u0026copy; 2024 Chloe Arciniega. Licensed under [MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphicmoe%2Fstatus-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapphicmoe%2Fstatus-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphicmoe%2Fstatus-worker/lists"}