mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
@@ -79,7 +79,7 @@ declare global {
|
||||
var count: number;
|
||||
}
|
||||
|
||||
globalThis.count = globalThis.count ?? 0;
|
||||
globalThis.count ??= 0;
|
||||
console.log(`Reloaded ${globalThis.count} times`);
|
||||
globalThis.count++;
|
||||
|
||||
@@ -105,7 +105,7 @@ Bun provides the following simplified API for implementing HTTP servers. Refer t
|
||||
```ts#server.ts
|
||||
import {type Serve} from "bun";
|
||||
|
||||
globalThis.count = globalThis.count ?? 0;
|
||||
globalThis.count ??= 0;
|
||||
globalThis.count++;
|
||||
|
||||
export default {
|
||||
@@ -133,7 +133,7 @@ declare global {
|
||||
var server: Server;
|
||||
}
|
||||
|
||||
globalThis.count = globalThis.count ?? 0;
|
||||
globalThis.count ??= 0;
|
||||
globalThis.count++;
|
||||
|
||||
// define server parameters
|
||||
|
||||
Reference in New Issue
Block a user