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>
9 lines
319 B
TypeScript
9 lines
319 B
TypeScript
import { serveBun } from '@green-tea/core/bun';
|
|
|
|
import { app } from './app';
|
|
|
|
// 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');
|