This repository was archived by the owner on Oct 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
examples/counter-serverless/scripts Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import type { Registry } from "../src/registry";
44async function main ( ) {
55 const client = createClient < Registry > ( "http://localhost:6420" ) ;
66
7- const counter = client . counter . getOrCreate ( ) . connect ( ) ;
7+ const counter = client . counter . getOrCreate ( ) ;
88
9- counter . on ( "newCount" , ( count : number ) => console . log ( "Event:" , count ) ) ;
9+ // counter.on("newCount", (count: number) => console.log("Event:", count));
1010
1111 for ( let i = 0 ; i < 5 ; i ++ ) {
1212 const out = await counter . increment ( 5 ) ;
@@ -16,7 +16,7 @@ async function main() {
1616 }
1717
1818 await new Promise ( ( resolve ) => setTimeout ( resolve , 10000 ) ) ;
19- await counter . dispose ( ) ;
19+ // await counter.dispose();
2020}
2121
2222main ( ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const toNextHandler = (
1111 const publicUrl =
1212 process . env . NEXT_PUBLIC_SITE_URL ??
1313 process . env . NEXT_PUBLIC_VERCEL_URL ??
14- `http://127.0.0.1:${ process . env . PORT ?? 8080 } ` ;
14+ `http://127.0.0.1:${ process . env . PORT ?? 3000 } ` ;
1515 inputConfig . runnerKind = "serverless" ;
1616 inputConfig . runEngine = true ;
1717 inputConfig . autoConfigureServerless = {
Original file line number Diff line number Diff line change @@ -239,10 +239,10 @@ async function configureServerlessRunner(config: RunnerConfig): Promise<void> {
239239 headers : customConfig . headers || { } ,
240240 max_runners : customConfig . maxRunners ?? 100 ,
241241 min_runners : customConfig . minRunners ?? 0 ,
242- request_lifespan : customConfig . requestLifespan ?? 15 * 60_000 ,
242+ request_lifespan : customConfig . requestLifespan ?? 15 * 60 ,
243243 runners_margin : customConfig . runnersMargin ?? 0 ,
244244 slots_per_runner :
245- customConfig . slotsPerRunner ?? config . totalSlots ?? 10000 ,
245+ customConfig . slotsPerRunner ?? config . totalSlots ?? 1000 ,
246246 } ,
247247 } ;
248248
You can’t perform that action at this time.
0 commit comments