feat(new): scaffold core 26.9.0-beta.2, and boot before binding on Deno and Bun
beta.2 made serveDeno and serveBun boot the app before they bind. The starters called Deno.serve and Bun.serve with app.fetch directly, so a provider that failed left an open port answering 500 to everything. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+18
-5
No files matched your search
@@ -1,4 +1,8 @@
|
||||
import { serveBun } from '@green-tea/core/bun';
|
||||
|
||||
import { app } from './app';
|
||||
|
||||
Bun.serve({ port: 8000, fetch: app.fetch });
|
||||
// Boots before it binds: a provider that fails stops the process here, instead
|
||||
// of leaving an open port that answers 500 to everything.
|
||||
await serveBun(app, { port: 8000 });
|
||||
console.log('🍵 green-tea running on http://localhost:8000');
|
||||
Reference in new issue
Block a user