Blitz is a batteries-included framework that’s inspired by Ruby on Rails, is built on Next.js, and features a “Zero-API” data layer abstraction that eliminates the need for REST/GraphQL.
If you’ve been developing a Blitz project locally and are ready to deploy it to Render, follow these steps:
- Switch your project to use PostgreSQL if you’re currently using SQLite (or another database).
- Add the YAML below to a
render.yamlfile at the root of your repo.
- Commit and push your changes to GitHub or GitLab.
- Deploy your code to Render. If you haven’t already, connect your GitHub or GitLab account to Render.
- Render will deploy your code as a web service, create a PostgreSQL instance, and configure the connection between them. Additionally, future pushes to your GitHub or GitLab repo will automatically deploy your Render web service.
services: - type: web name: blitzapp env: node plan: starter buildCommand: yarn --frozen-lockfile --prod=false && blitz prisma generate && blitz build && blitz prisma migrate deploy startCommand: blitz start envVars: - key: NODE_ENV value: production - key: DATABASE_URL fromDatabase: name: blitzapp-db property: connectionString - key: SESSION_SECRET_KEY generateValue: true databases: - name: blitzapp-db plan: starter
You may also find it helpful to review the commit history of the repo used for the one-click deploy above to better understand these steps.