Skip to content

buhst/api.buh.st

Repository files navigation

Vercel Laravel 10 Starter

Credit

Majority of updates taken from pull request by @cmizzi

Important Files

This repository inherits from Laravel 10.x. Important files are the following ones:

Build assets

Add the following snippet in the composer.json file.

{
    "scripts": {
        "vercel": [
            "npm install",
            "npm run build"
        ]
    }
}

Enable HTTPS

See app/Http/Middleware/TrustProxies.php.

-   protected $proxies = null;
+   protected $proxies = "*";   

Common

You still need to setup the basics, such as making an .env file, setting an APP_KEY, etc.

Do not save your APP_KEY in the .vercel.json file. You must set this in the settings.

Create .env file

cp .env.example .env

Create dist folder

If you do not want to change the build output folder settings, run this:

mkdir dist
echo "# for vercel output" >> dist/.gitkeep

There is a chance that your local .dotfiles have the dist folder in a .gitignore file, so force add it:

git add dist -f
git commit -m "chore: dist folder for vercel output"
git push

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages