Skip to content

Commit

Permalink
Add some ts config files with default exports for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnmcknight committed May 18, 2024
1 parent d9af637 commit ca7cb2e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/runner/moleculer.config.async.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import fetch from "node-fetch";

/**
* Test:
*
* npx ts-node -T bin\moleculer-runner.js -c examples\runner\moleculer.config.async.ts -r examples/user.service.js
*/
export default async function () {
const res = await fetch("https://pastebin.com/raw/SLZRqfHX");
return await res.json();
}
16 changes: 16 additions & 0 deletions examples/runner/moleculer.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Test:
*
* npx ts-node -T bin\moleculer-runner.js -c examples\runner\moleculer.config.ts -r examples/user.service.js
*/
export default {
namespace: "bbb",
logger: true,
logLevel: "debug",
//transporter: "TCP"
hotReload: true,

created(broker) {
broker.logger.info("Typescript configuration loaded!");
}
};

0 comments on commit ca7cb2e

Please sign in to comment.