Few weeks ago, we introduced Vercel as the most powerful and scalable platform for static websites and serverless functions powered by any language or framework.
This came at the expense of writing vercel.json files. Today, we are introducing Zero Config, a conventional and completely backwards-compatible approach to deployment.
To start, create a new project using a frontend stack of your choice. For this example, we'll create a vanilla Next.js project:
npm create next-app
Then, from within the project, with no additional configuration, run the following command (requires Vercel CLI or our integration for GitHub/GitLab):
vercel
That's it. It works for any framework or tool you can think of.
No matter if you're using Gatsby, Vue, Ember, Svelte or any other package.json project with a build script, you always get fully static or hybrid rendering out of the box.
Upon deployment, we optimize your frontend seamlessly and deploy it to our built-in Smart CDN. Fast to develop, build, and serve.
Now, how about adding the power of serverless functions to our site?
Let's use Gatsby for the frontend, combined with Go for the backend. For this, we'll start by creating a new Gatsby project:
gatsby new gatsby-site
This can already be deployed, zero config. To add functions, create an api directory:
Then, with no additional configuration, run the following command (requires Vercel CLI or our integration for GitHub/GitLab):
vercel
Your function will now be accessible at /api/my-function.
All our existing languages are supported and mapped by file extension. You can even use [brackets].js to define dynamic routes. To learn more, check out our docs.