Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peopledrivemecrazy/the-not-to-do-list
Cloudflare DNS TXT record as a todo list
https://github.com/peopledrivemecrazy/the-not-to-do-list
Last synced: about 1 month ago
JSON representation
Cloudflare DNS TXT record as a todo list
- Host: GitHub
- URL: https://github.com/peopledrivemecrazy/the-not-to-do-list
- Owner: peopledrivemecrazy
- Created: 2024-03-20T04:05:08.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-21T04:44:41.000Z (10 months ago)
- Last Synced: 2024-03-21T05:38:40.419Z (10 months ago)
- Language: Svelte
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Why?
![alt text](image.png)
https://twitter.com/wesbos/status/1769770742273417590# Setup
`pnpm i` or `npm i`
This project uses Sveltekit and PicoCSS for css.
Cloudflare wrapper for interacting with DNS records.
# env variables
```
CF_API_TOKEN
CF_ZONE_ID
CLOUDFLARE_API_KEY
CLOUDFLARE_EMAIL
DNS_TXT_RECORD_ID
```Create your new TXT record with a name of your choice, I have hardcoded to `notodo` see `+page.server.ts` under `actions`.
Obtaining TXT record id
### Noob way
Use dev tools -> inspect the edit button look for the `aria-controls` attribute just remove `-dns-edit-row`
![alt text](image-1.png)
### Hackerman way
```ts
const recordsList = await cloudflare.dns.records.list({
zone_id: CF_ZONE_ID
});
recordsList.result.filter((e) => {
if (e.type === 'TXT') console.log({ name: e.name, id: e.id });
}); // find your record and id
```