- PHP 8.2
- NPM
- Composer
- Herd (ideally)
We use sqlite locally for local development ease.
Setup instructions
cp .env.example .env
composer install
./artisan migrate
npm 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
.
herd link
herd secure
open "https://lech.test"
Test API token is lech_E64ujZycu1lDYIeO3jeIeTff0Jz0pH5lqFWbUzR97caaca42
.
You can use the openapi.yaml
file to see the full API spec.
curl "https://lech.test/api/encode" -H "X-Api-Token: <token>" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"url": "https://www.google.com"}'
curl "https://lech.test/api/decode" -H "X-Api-Token: <token>" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"url": "https://lech.test/123456"}'