Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewosh committed Sep 11, 2024
1 parent d68eb81 commit d005502
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Hyperschema = require('hyperschema')
const Hyperswitch = require('.')
const Hyperdispatch = require('.')

const SCHEMA_DIR = './output/hyperschema'
const SWITCH_DIR = './output/hyperswitch'
const DISPATCH_DIR = './output/hyperdispatch'

const schema = Hyperschema.from(SCHEMA_DIR)
const ns1 = schema.namespace('example')
Expand Down Expand Up @@ -36,8 +36,8 @@ ns1.register({

Hyperschema.toDisk(schema)

const hyperswitch = Hyperswitch.from(SCHEMA_DIR, SWITCH_DIR)
const ns2 = hyperswitch.namespace('example')
const hyperdispatch = Hyperdispatch.from(SCHEMA_DIR, DISPATCH_DIR)
const ns2 = hyperdispatch.namespace('example')

ns2.register({
name: 'command1',
Expand All @@ -52,4 +52,4 @@ ns2.register({
requestType: '@example/request2'
})

Hyperswitch.toDisk(hyperswitch)
Hyperdispatch.toDisk(hyperdispatch)

0 comments on commit d005502

Please sign in to comment.