An open API service indexing awesome lists of open source software.

https://github.com/yuler/rails-shortener


https://github.com/yuler/rails-shortener

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# rails shortener

> A url shortener power by rails,

## Stack

- Deploy by [kamal](https://kamal-deploy.org/)

## Note

- This repo is for learn rails from [Build a URL Shortener with Rails 7](https://gorails.com/series/build-a-url-shortener-with-rails-7). [YouTube](https://www.youtube.com/watch?v=XHRUjXUcr04&list=PLm8ctt9NhMNXOBboD4FvLdZU_Cner2uk0&index=1), [Source Code](https://github.dev/gorails-screencasts/url-shortener)

## Related

-
-
-
-

## Kamal

```bash
kamal app exec -i 'bin/rails console'
```

## API

```bash
TOKEN=xxx # https://yuler.cc/djtjA6bOM1
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"link": {"url": "https://github.com/yuler"}}' https://yuler.cc/api/links
curl -H "Authorization: Bearer $TOKEN" https://yuler.cc/api/links
```

## TODO

- [ ] Fix cookies['link_form_url'] not work
- [ ] Design Home Page
- [ ] Add widget for other site embed