Skip to content

Commit

Permalink
#296: fixed node-client example
Browse files Browse the repository at this point in the history
  • Loading branch information
basmasking committed May 13, 2024
1 parent a50ab79 commit 0a938f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/concepts/node-client/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

import { startClient } from 'jitar';
import { startClient, Import } from 'jitar';

const client = await startClient('http://127.0.0.1:3000', ['client']);

const { default: getLuckyNumber } = await client.import('./getLuckyNumber', 'application') as any;
const importModel = new Import('client', './getLuckyNumber', 'application');

const { default: getLuckyNumber } = await client.import(importModel) as any;

const number = await getLuckyNumber(0, 100);

Expand Down

0 comments on commit 0a938f0

Please sign in to comment.