Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashleyhindle/lech
URL Shortening Service for Atarim Test
https://github.com/ashleyhindle/lech
laravel livewire
Last synced: 8 days ago
JSON representation
URL Shortening Service for Atarim Test
- Host: GitHub
- URL: https://github.com/ashleyhindle/lech
- Owner: ashleyhindle
- Created: 2025-01-28T09:56:39.000Z (9 days ago)
- Default Branch: main
- Last Pushed: 2025-01-28T16:40:58.000Z (8 days ago)
- Last Synced: 2025-01-28T17:35:42.656Z (8 days ago)
- Topics: laravel, livewire
- Language: PHP
- Homepage: https://lech.ing
- Size: 259 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snazzy URL shortening - lech
[![lech-logo](./public/favicon-96x96.png)](https://lech.ing)## Requirements
- PHP 8.2
- NPM
- Composer
- Herd (ideally)## Getting setup
We use sqlite locally for local development ease.
**Setup instructions**
```bash
cp .env.example .env
composer install
./artisan migratenpm install
npm run build
composer run dev
```It's best to use `herd` to link this project so it's available at `https://lech.test`, but you can also just run `php artisan serve` and visit `http://localhost:8000`.
```bash
herd link
herd secure
open "https://lech.test"
```## API
Test API token is `lech_E64ujZycu1lDYIeO3jeIeTff0Jz0pH5lqFWbUzR97caaca42`.
You can use the `openapi.yaml` file to see the full API spec.
### Encoding
```bash
curl "https://lech.test/api/encode" -H "X-Api-Token: " -H "Accept: application/json" -H "Content-Type: application/json" -d '{"url": "https://www.google.com"}'
```### Decoding
```bash
curl "https://lech.test/api/decode" -H "X-Api-Token: " -H "Accept: application/json" -H "Content-Type: application/json" -d '{"url": "https://lech.test/123456"}'
```