This example shows how to deploy a standard Laravel application on Wasmer Edge.
https://<your-subdomain>.wasmer.app/ (deploy to get your own Laravel instance)
The project comes from composer create-project laravel/laravel with light tweaks:
routes/web.phpdefines the default route that returns thewelcomeBlade view.public/index.phpis Laravel’s front controller; Wasmer points traffic here.- Cached configuration under
bootstrap/cache/may contain absolute paths—update them to/app/...during deployment so they match Wasmer’s filesystem layout.
Add controllers, middleware, and Blade templates as you would in any Laravel app.
composer install
php artisan serve --host 127.0.0.1 --port 8000Visit http://127.0.0.1:8000/ to confirm the welcome page. For parity with Wasmer, you can also run:
php -S 127.0.0.1:8000 -t public- Run
composer install --no-dev --optimize-autoloaderand (optionally)php artisan config:cache route:cache. - Rewrite cached paths to
/appif necessary (sed -i '' "s|$PWD|/app|g" bootstrap/cache/*.phpon macOS). - Deploy to Wasmer Edge with a start command like
php -S 0.0.0.0:$PORT -t public.