13/12/24 / DAY 5
It's the final day of Launch Week and we're excited to introduce a brand new way of running CPU-intensive JavaScript workloads that provides even more performance and scalability than has been possible before: Worker Pooling.
It works by combining the multi-threaded nature of Encore.ts' high-performance Rust runtime with multiple worker threads in NodeJS.
This means your applications are no longer constrained by JavaScript's single-threaded event loop. Instead, Encore.ts is now able to orchestrate and coordinate workloads across multiple event loops, providing a dramatic performance boost for CPU-intensive workloads.
When enabled via a simple configuration in your Encore project, all worker thread management is handled automatically by Encore.ts. You don't need to write any thread management code, create worker pools, or handle thread coordination yourself — Encore.ts takes care of creating and orchestrating worker threads based on your application's needs.
Learn more in the launch blog post.
Performance improvements
In our tests, real-world applications that reach the limits of NodeJS' single-threaded performance have achieved up to a **5x performance improvement** when using Encore.ts Worker Pooling, compared to Encore.ts running in single-threaded mode.
Bonus: This is on top of the already huge performance benefits that Encore.ts provides compared to other frameworks.
Join the live stream
Tune into today's live stream at 14:00 CET for an in-depth walkthrough and a live Q&A session.
12/12/24 / DAY 4
We're excited to announce the release of advanced value-based validation support for Encore.ts, taking API development to the next level.
How it works
Encore allows you to define request and response types using standard TypeScript. These types ensure type-safety during both compile-time and runtime.
If a request doesn't match the expected type, Encore automatically returns an error. When it does match, your API handlers receive fully type-safe parameter objects, making your code more reliable and maintainable.
Validation types
This release introduces powerful validation types, including:
200
response, so you know everything works as expected.11/12/24 / DAY 3
We're continuing our open source journey, which started by open sourcing everything you need to build Encore applications, including:
10/12/24 / DAY 2
Today we're launching Public Buckets, an extension of our recently released Object Storage primitive for Encore.go and Encore.ts. This feature simplifies working with public-facing file storage directly in your application code and adds CDN support for optimal content delivery.
How Object Storage works in Encore
Encore lets you integrate infrastructure as type-safe objects in your application code. Whether you're creating a database, a Pub/Sub topic, or an Object Storage bucket, it's as easy as writing a few lines of code. See how in the docs
Public Buckets: Simple file sharing
With the public flag set to true, you can now generate public URLs for files in your bucket. This makes it effortless to share files with users via your frontend or external services.
Simple testing in the Development Dashboard
Encore's Development Dashboard makes testing very simple. Call your endpoints, such as the list endpoint, to view and trace requests and get detailed insights. Traces provide insights including file uploads and bucket queries, helping you debug and optimize.
With Public Buckets, Encore makes managing object storage and public file access simple, powerful, and fully type-safe.
Encore Cloud now supports Cloudflare R2
Cloudflare R2 can often be a cheaper alternative to AWS S3, so we're very excited to announce that Encore Cloud now supports it. This is great for anyone looking to save costs on object storage, while getting access to a global CDN.
Join the live stream
Tune into today's live stream at 14:00 CET for an in-depth walkthrough and a live Q&A session.
You can also learn more in the launch video and documentation.
09/12/24 / DAY 1
You asked, we delivered! Starting today, you can define your own middleware in Encore.ts.
While common use cases like authentication, logging, and tracing are already built-in, Custom Middleware now lets you create middleware tailored to your application with ease. This is great for cases where you want to write reusable functionality that applies to multiple API endpoints.
How it works
Encore.ts makes it simple to create middleware by letting you attach middleware functions to specific services through the service definitions configuration. Middleware can be configured with a target
option to specify which API endpoints it applies to, such as those requiring authentication.
Middleware operates as a chain of functions:
next
function.