https://github.com/yusukebe/marks
Bookmarks App with Cloudflare Workers.
https://github.com/yusukebe/marks
cloudflare cloudflare-workers
Last synced: 21 days ago
JSON representation
Bookmarks App with Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/yusukebe/marks
- Owner: yusukebe
- License: mit
- Created: 2021-09-29T07:53:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T07:58:39.000Z (about 3 years ago)
- Last Synced: 2025-03-29T07:02:00.614Z (about 1 month ago)
- Topics: cloudflare, cloudflare-workers
- Language: TypeScript
- Homepage:
- Size: 1.03 MB
- Stars: 27
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔖 Marks
Bookmark App with Cloudflare Workers.
You can deploy your own Marks to the Cloudflare Workers.
## Screenshots

Add Bookmark from shortcuts of macOS:

## Prerequisites
* Cloudflare Account
* [Wrangler](https://developers.cloudflare.com/workers/cli-wrangler/)## Install
```plain
$ git clone https://github.com/yusukebe/marks.git
$ cd marks
$ yarn install
```## Setting
Rename `wrangler.toml`:
```plain
$ mv wrangler.example.toml wrangler.toml
```Make KV namespace id:
```plain
$ wrangler kv:namespace create BOOKMARK🌀 Creating namespace with title "marks-BOOKMARK"
✨ Success!
Add the following to your configuration file in your kv_namespaces array:
{ binding = "BOOKMARK", id = "your id" }
```Edit `wrangler.toml`:
```toml
kv_namespaces = [
{ binding = "BOOKMARK", id = "your id" }
]
```Set your Basic Auth username and password:
```plain
$ wrangler secret put NAME
$ wrangler secret put PASS
```## Build&Deploy
```plain
$ wrangler publish
```## macOS Shortcuts

## Bookmarklet
```js
javascript: (function () {
var url = document.location.href
var links = document.getElementsByTagName('link')
for (i in links) {
if (links[i].rel) {
if (links[i].rel.toLowerCase() == 'canonical') {
url = links[i].href
}
}
}
var redirect =
'https://{app-name}.{your-name}.workers.dev/?url=' + encodeURIComponent(url)
location.href = redirect
})()
```## Author
Yusuke Wada
## License
MIT