Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/santosreis/laravel11-url-shortener
- Owner: SantosReis
- Created: 2024-04-27T11:24:06.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T11:51:15.000Z (10 months ago)
- Last Synced: 2024-11-20T20:56:03.742Z (3 months ago)
- Topics: laravel, laravel11, php, php8, tdd
- Language: PHP
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
> ```