Back to articles
Encore Has a Free API: The Backend Framework That Generates Infrastructure
How-ToDevOps

Encore Has a Free API: The Backend Framework That Generates Infrastructure

via Dev.to DevOpsAlex Spinov

What if your backend framework could look at your code and automatically provision databases, pub/sub, cron jobs, and API gateways? What Is Encore? Encore is a backend framework (Go and TypeScript) that uses static analysis to understand your app's infrastructure needs and automatically provisions everything — locally, in CI, and in production. // TypeScript version import { api } from " encore.dev/api " import { SQLDatabase } from " encore.dev/storage/sqldb " const db = new SQLDatabase ( " users " , { migrations : " ./migrations " }) export const getUser = api ( { method : " GET " , path : " /users/:id " , expose : true }, async ({ id }: { id : string }) => { const user = await db . queryRow \ `SELECT * FROM users WHERE id = \$ {id} \` return user } ) Run encore run and Encore: Sees you defined a SQL database → provisions PostgreSQL locally Sees you defined an API → generates API gateway + docs Sees the dependency graph → creates architecture diagram Go Version package user import "en

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
5 views

Related Articles