Skip to content

Commit

Permalink
feat: add example.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MHCYR authored and adantoscano committed Oct 5, 2023
1 parent d8f0247 commit 7ccf8dc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const OpenApiMocker = require("open-api-mocker");

const main = async () => {
const openApiMocker = new OpenApiMocker({
port: 5000,
schema: `${__dirname}/../tests/schema-examples/basic.yaml`,
watch: true,
});

await openApiMocker.validate();

await openApiMocker.mock();
};

main();

0 comments on commit 7ccf8dc

Please # to comment.