Encore is the Backend Development Platform purpose-built to help you create event-driven and distributed systems.
We're excited to share Encore's world-class developer experience now extends to asynchronous event processing with the addition of Encore PubSub!
Pub/Sub is one of the core building blocks of modern distributed systems. This means you can now easily:
Building such applications typically involves endless repetition and tedious boilerplate. No more.
Run encore version update
to grab the latest version and experience it for yourself!
— If you're new to Encore, check out the Quick Start Guide to get started building.
Encore PubSub takes the same approach to building distributed systems as the rest of Encore, and makes building event-driven, asynchronous a breeze. With Encore you define your topics and subscriptions directly in your backend code, like any other object.
With just a few lines of code we have a serverless backend that scales from zero to hundreds of millions of users, with zero boilerplate and with static type safety. Encore takes care of all the complex, boring parts, so you can focus on building your product:
The best part of all? It works the same way for local development as well as the major cloud providers. Encore provisions the cloud native infrastructure component for your specific cloud provider of choice, but the code works the same way.
To define a topic and begin publishing messages is just a handful lines of code:
import "encore.dev/pubsub"
type SignupEvent struct {
Username string
Email string
}
var Signups = pubsub.NewTopic[*SignupEvent]("user-signups", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.AtLeastOnce,
})
// To publish a message:
_, err := Signups.Publish(ctx, &SignupEvent{Username: "jane.doe", Email: "[email protected]"})
To begin receiving messages is equally simple:
import "encore.dev/pubsub"
var _ = pubsub.NewSubscription(
user.Signups, "send-welcome-email",
pubsub.SubscriptionConfig[*user.SignupEvent] {
Handler: SendWelcomeEmail,
},
)
func SendWelcomeEmail(ctx context.Context, event *user.SignupEvent) error {
// .. send email ...
}
To complement the new PubSub support Encore now comes with a new et
(encore testing) package to simplify testing distributed systems.
We're starting with support for testing PubSub behavior, but over time we plan to expand on it to support easy testing of various distributed system behaviors. Read the package docs for more information.
encore db shell
database sessions (#263)GOARCH
and the docker base image for encore eject docker
(#269)encore run
before encore auth login
on new systems (#299)encore.dev/rlog
log output when using structured logging of booleans (#308)We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Big thanks to @davidmytton, @bscott, @bjaanes and others for your bug reports and feedback!
Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.
Over the coming weeks we'll be adding much requested flexibility to the Encore framework, with improved support for things like: middleware, configuration and dependency injection. Vote on your favorite feature on the roadmap – If you like what's going on, why not give the project a star?
As always, if you have questions or ideas, come tell us on Slack. We’re excited to hear your feedback! ❤️
Catch you in the cloud, André & the Encore team
We're hard at work adding much requested flexibility to the Encore framework. In this week's release, we've added native support for HTTP headers in Encore APIs and authentication handlers. No more having to use only JSON!
This means you can now easily:
Run encore version update
to grab the latest version and experience it for yourself!
– If you're new to Encore, check out the Quick Start Guide to get started building.
Encore now supports a more flexible way to express authentication handlers, using struct payloads in the same way you're used to for regular endpoints. The struct payloads can include multiple fields that can be sourced from either HTTP Headers or query strings.
That means you can do things like:
client_id
as a query string and an API key in the Authorization
header, at the same timeThe Encore client code generation has received a major upgrade for both TypeScript and Go clients.
fetch
optionsNote: The Go client now validates the provided HTTP method for calling raw endpoints. In the rare case that a raw endpoint was called without a valid Method
, the behavior of the new client generator will differ by returning an error. In previous versions it instead defaulted to making a GET
request.
%2F
within string path segments no longer causes that path segment to be treated as two separate segments._
to avoid name collisions.Authorization
headerencore.Meta
function now reports the correct value for the APIBaseURL
field for local development (#245)encore eject docker --help
for more information.We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Big thanks to @ValeriaVG, @Qolzam, Prasanna Balaji, @vilhelmmelkstam, and @MaxDanielsson for your bug reports and feedback!
Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.
Over the coming weeks we'll be adding much requested flexibility to the Encore framework, with improved support for things like: middleware, configuration and dependency injection. Vote on your favorite feature on the roadmap – If you like what's going on, why not give the project a star?
As always, if you have questions or ideas, come tell us on Slack. We’re excited to hear your feedback! ❤️
Catch you in the cloud, André & the Encore team
As developers, we often find ourselves in situations where we need to change something in our codebase, but don't want to change it everywhere the code is deployed.
Using Encore's new App Metadata API, you can now query the runtime to find out what environment the application is running in. Which means you can easily load the appropriate configuration files into memory and get the correct behavior for each environment.
This makes it a breeze to do things like:
Check out the docs to learn more.
With this release, we've updated the runtime API with the new metadata API's and types. To upgrade you will need to both:
encore version update
to download v1.1.0
of the Encore compiler.go get -u encore.dev
to upgrade to the latest runtime API.— Thanks to @davidmytton, @klemmster, @ValeriaVG, @vilhelmmelkstam, @kwihl, and @MaxDanielsson for your contributions, bug reports, and feedback!
Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.
Over the coming weeks we'll be releasing a vastly improved web UI, and focus on adding much requested flexibility to the Encore framework. We'll add improved support for things like: http headers in Encore APIs, middleware, and dependency injection.
As always, if you have questions or feedback, tell us on Slack or just reply to this email. We're excited to hear your feedback! ❤️
Catch you in the cloud, The Encore team
As developers, we often find ourselves in situations where we need to change something in our codebase, but don't want to change it everywhere the code is deployed.
Using Encore's new App Metadata API, you can now query the runtime to find out what environment the application is running in. Which means you can easily load the appropriate configuration files into memory and get the correct behavior for each environment.
This makes it a breeze to do things like:
Check out the docs to learn more.
With this release, we've updated the runtime API with the new metadata API's and types. To upgrade you will need to both:
encore version update
to download v1.1.0
of the Encore compiler.go get -u encore.dev
to upgrade to the latest runtime API.— Thanks to @davidmytton, @klemmster, @ValeriaVG, @vilhelmmelkstam, @kwihl, and @MaxDanielsson for your contributions, bug reports, and feedback!
Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.
Over the coming weeks we'll be releasing a vastly improved web UI, and focus on adding much requested flexibility to the Encore framework. We'll add improved support for things like: http headers in Encore APIs, middleware, and dependency injection.
As always, if you have questions or feedback, tell us on Slack or just reply to this email. We're excited to hear your feedback! ❤️
Catch you in the cloud, The Encore team
We're incredibly excited to announce Encore v1.0. With this release, Encore is fully prepared to support you in your next creative endeavour.
It's our belief that Encore will transform developers' lives. Our work will become far more joyful and creative. Rather than it being 80% about configuring tools and services that have been reconfigured thousands of times before, we'll spend our days building new products that have a real impact. And that could have huge benefits for society. Imagine the exciting innovations if the world's 25+ million developers are freed up to be five times more productive!
We hope that Encore will open things up to a broader range of folk. You won't need to have a deep understanding of the nuances of cloud services to develop world-changing software that is available on a global scale. Now more people who are passionate about real-world issues which they're trying to solve will be empowered to have an incredible impact.
We're happy to announce that we've added full support for deploying your Encore applications to Amazon Web Services. This is a huge milestone, as Encore now supports deploying seamlessly to all major cloud providers.
If you wish, you can easily deploy your application to all of them, for those multi-cloud bragging rights. With Encore it's as easy as connecting your cloud account. There's no second step.
Check out the docs to learn how to connect your Encore app to your AWS account and start deploying in minutes.
When you deploy your Encore application, the platform takes care of building your app, provisioning the necessary infrastructure, and orchestrating the deployment. With this release, we've made builds blazing fast and laid the foundation for better and more structured build logs. Behind the scenes we've ripped out GCP Cloud Build and replaced it with our own firecracker based builder. If this tickles your fancy, we're busy writing an in-depth article on this very topic. Watch this space for more details.
Catch you in the cloud, The Encore Team
One of the core beliefs behind Encore is that developers shouldn't need to worry about the intricacies of cloud infrastructure. Instead you should focus on being creative and crafting unique software for your users.
To achieve this, Encore enables you to deploy your applications to any supported clouds (yes plural), without making code changes. We're super excited to announce we've now added full support for Microsoft Azure to the list!
Float into the flow with Azure:
Check out the docs to learn more.
Over the coming weeks we'll be adding AWS to the mix, dropping a huge UI update, and get on with adding native support for Queues and Object storage.
– Remember, you can share your comments and ideas on our Public Roadmap.
As always, if you have questions or feedback, join us on Slack or just reply to this email.
We're excited to hear your feedback!
We're continuously refining the Encore experience to make it even more frictionless, and give you more control and flexibility. This week we've released a bunch of big improvements to how deployments work for all your Encore applications.
Developers building with Encore are forward thinkers working on interesting and exciting projects. Join the conversation on Slack to see what's going on, and share what you're working on.
Over the coming weeks we’ll be reactivating AWS and Azure support for all Encore users, releasing a polished version of the Web Platform, adding native support for queues and object storage, and much more. – Remember, you can share your comments and ideas on our Public Roadmap.
As always, if you have questions or feedback, join us on Slack. We’re excited to hear your feedback! ❤️
To celebrate the release of Go 1.18, we’ve updated Encore with first-class support for generics, API fuzzing, and more!
Simply run encore version update
to upgrade and get all these goodies.
Encore v0.21 comes with full support for Go 1.18's generics! You can now write generic code with Encore, use generic types in API request and response schemas, and more:
Encore extends Go 1.18's support for fuzzing to include fuzz testing Encore APIs. Use encore test -fuzz=.
to start fuzzing! Fuzzing is a great way to improve the security of your APIs by ensuring they can handle arbitrary inputs.
Developers building with Encore are forward thinkers working on interesting and exciting projects. Join the conversation on Slack to see what's going on, and share what you're working on.
We'll shortly be releasing improvements to the Deployment UX, and in the coming weeks give you more knobs in the Distributed Tracing dashboard, add native support for Object Storage, and much more!
— Remember, you can share your comments and ideas on our Public Roadmap.
We're excited to hear your feedback! ❤️
Keep building, André (Founder) & the Encore team
You asked for it, and so it's here! We've just released Custom Domains, which lets you serve your Encore powered backend API's from your own domains. No proxy, no certificates, and no hassle!
The best part? No need to update your CLI tools, just head to the Web Platform and try it out yourself!
📚 Check out the docs to learn more.
One of the lesser known — but very powerful — features of Encore just got even better!
In case you didn't know: When you've linked your app with GitHub, Encore will automatically provision dedicated Preview Environments for each pull request. (See how in the docs)
PR environments work just like regular development environments, and lets you test your changes before merging. This week, we made PR environments even better, and added full support for Encore's native Cron Jobs!
— Thanks to @MaxDanielsson, @VilhelmMelkstam, and @gmlewis for giving us feedback!
Developers building with Encore are forward thinkers working on interesting and exciting projects. Join the conversation on Slack to see what's going on, and share what you're working on.
Over the coming weeks we'll be improving the Deployment UX, give you more knobs in the Distributed Tracing dashboard, add native support for Object Storage, and much more!
— Remember, you can share your comments and ideas on our Public Roadmap.
We're excited to hear your feedback! ❤️
Keep building, André (Founder) & the Encore team
When building backend applications you often need to run periodic and recurring tasks. For example, to send a welcome email to everyone who signed up recently. Encore provides native support for these types of use cases using Cron Jobs. Here's how easy it is:
import "encore.dev/cron"
// Send a welcome email to everyone who signed up in the last two hours.
var _ = cron.NewJob("welcome-email", cron.JobConfig{
Title: "Send welcome emails",
Every: 2 * cron.Hour,
Endpoint: SendWelcomeEmail,
})
That's it! When this is deployed, the Encore Platform will call the SendWelcomeEmail
endpoint (not pictured) every 2 hours. There is no need to maintain any infrastructure; Encore itself takes care of the scheduling, monitoring and execution. Hooray! ✨
What's more, Encore's web platform has a shiny new Cron Jobs dashboard to help you keep track of all your jobs. Check it out:
This means you can now schedule recurring tasks without worrying about:
To get started, install the latest Encore release with encore version update
and upgrade your application's dependency with go get encore.dev@latest
.
Check out the docs 📚 to learn more.
encore test -cover
(#144)encore test
mistakenly requiring Docker when the app has no database (#98)Thanks to @ValeriaVG and @wisdommatt for the contributions!