just copy vercel.json
, .vercelignore
to root project directory, create api
folder to root project directory and latest copy index.php
to api
folder,
all set automaticly!
Last active
April 29, 2021 09:53
-
-
Save albasyir/a068dc5ad5c86e5e0fac3b0a2adb5d76 to your computer and use it in GitHub Desktop.
Vercel Config for Laravel, make your laravel hosted free!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
vendor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Plate it to /api/index.php | |
// Forward Vercel requests to normal index.php | |
require __DIR__ . '/../public/index.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 2, | |
"functions": { | |
"api/index.php": { "runtime": "[email protected]" } | |
}, | |
"routes": [ | |
{ | |
"src": "/(.*)", | |
"dest": "/api/index.php" | |
} | |
], | |
"env": { | |
"APP_ENV": "production", | |
"APP_DEBUG": "true", | |
"APP_URL": "https://yourproductionurl.com", | |
"APP_CONFIG_CACHE": "/tmp/config.php", | |
"APP_EVENTS_CACHE": "/tmp/events.php", | |
"APP_PACKAGES_CACHE": "/tmp/packages.php", | |
"APP_ROUTES_CACHE": "/tmp/routes.php", | |
"APP_SERVICES_CACHE": "/tmp/services.php", | |
"VIEW_COMPILED_PATH": "/tmp", | |
"CACHE_DRIVER": "array", | |
"LOG_CHANNEL": "stderr", | |
"SESSION_DRIVER": "cookie" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment