Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/santosreis/laravel11-url-shortener

Backend URL Shortener to integrate with frontend following frontend: vue-url-shortener.
https://github.com/santosreis/laravel11-url-shortener

laravel laravel11 php php8 tdd

Last synced: 20 days ago
JSON representation

Backend URL Shortener to integrate with frontend following frontend: vue-url-shortener.

Awesome Lists containing this project

README

        

## URL Shortener

Backend URL Shortener to integrate with frontend following frontend: [vue-url-shortener](https://github.com/SantosReis/vue-url-shortener).

NOTE: SQLite is enabled to use.

### Testing features available

NOTE: there are 2 of 5 tests deployed

```
php artisan test --filter=UrlShortenerTest
```

### API endpoints available

POST /api/shortener Generate URL Shortener

##### Parameters

> | name | type | data type | description |
> | ----- | -------- | ------------ | ----------------------- |
> | `url` | required | string (255) | The url to be shortened |

##### Responses

> | http code | content-type | response |
> | --------- | ------------------ | ----------- |
> | `200` | `application/json` | JSON string |

##### Example cURL

> ```javascript
> curl -X GET -H "Content-Type: application/json" http://localhost:8889/api/shortener
> ```

GET /api/shortener-list Listing URL Shorteners

##### Parameters

> None

##### Responses

> | http code | content-type | response |
> | --------- | -------------------------- | ----------- |
> | `200` | `text/plain;charset=UTF-8` | JSON string |

##### Example cURL

> ```javascript
> curl -X GET -H "Content-Type: application/json" http://localhost:8889/api/shortener-list
> ```