blob: 0d68b7d41dc484acce471097439ffa2871b2840e [file] [log] [blame]
Peter Leedf26beb2016-07-28 23:42:27 -07001#
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
Peter Leedf26beb2016-07-28 23:42:27 -070010yang = require('yang-js')
Matteo78ff07d2016-08-01 09:57:16 -070011argv = require('minimist')(process.argv.slice(2))
Peter Leedf26beb2016-07-28 23:42:27 -070012
Peter K. Lee87698fa2016-08-08 23:37:56 -070013app = require('yang-express') {
Peter Leedf26beb2016-07-28 23:42:27 -070014 models: [
15 yang.require 'cord-core'
16 yang.require 'xos-core'
17 ]
Peter K. Lee87698fa2016-08-08 23:37:56 -070018 controllers: [
19 'restjson'
20 'socket-io'
21 ]
22 views: [
Peter Leedf26beb2016-07-28 23:42:27 -070023
Peter K. Lee87698fa2016-08-08 23:37:56 -070024 ]
25 data: require '../../sample-data.json'
Peter Leedf26beb2016-07-28 23:42:27 -070026}
Peter K. Lee87698fa2016-08-08 23:37:56 -070027app.run argv.port || 5050