Peter Lee | df26beb | 2016-07-28 23:42:27 -0700 | [diff] [blame] | 1 | # |
| 2 | # Author: Peter K. Lee (peter@corenova.com) |
| 3 | # |
| 4 | # All rights reserved. This program and the accompanying materials |
| 5 | # are made available under the terms of the Apache License, Version 2.0 |
| 6 | # which accompanies this distribution, and is available at |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | |
| 10 | require('events').EventEmitter.defaultMaxListeners = 100 |
| 11 | |
| 12 | yang = require('yang-js') |
Matteo | 78ff07d | 2016-08-01 09:57:16 -0700 | [diff] [blame^] | 13 | argv = require('minimist')(process.argv.slice(2)) |
Peter Lee | df26beb | 2016-07-28 23:42:27 -0700 | [diff] [blame] | 14 | |
| 15 | require('yang-express').run { |
| 16 | |
Matteo | 78ff07d | 2016-08-01 09:57:16 -0700 | [diff] [blame^] | 17 | port: argv.port || 5050 |
Peter Lee | df26beb | 2016-07-28 23:42:27 -0700 | [diff] [blame] | 18 | models: [ |
| 19 | yang.require 'cord-core' |
| 20 | yang.require 'xos-core' |
| 21 | ] |
| 22 | data: require '../../sample-data.json' |
| 23 | |
| 24 | } |