update to latest yang-express and adapt api/server to specify controller/view
diff --git a/src/api/README.md b/src/api/README.md
index 43de746..1c7fc92 100644
--- a/src/api/README.md
+++ b/src/api/README.md
@@ -404,8 +404,8 @@
`mandatory` *id* and *service-specific-id* properties, it will
generate an error and reject the request.
-Also, if you tried to PUT using data values that does not conform to
-the underlying YANG schema for that data element, it will generate an
+Also, if you tried to PUT using data values that do not conform to the
+underlying YANG schema for that data element, it will generate an
error and reject the requst.
Invalid Request:
diff --git a/src/api/server.coffee b/src/api/server.coffee
index c315445..0d68b7d 100644
--- a/src/api/server.coffee
+++ b/src/api/server.coffee
@@ -10,13 +10,18 @@
yang = require('yang-js')
argv = require('minimist')(process.argv.slice(2))
-require('yang-express').run {
-
- port: argv.port || 5050
+app = require('yang-express') {
models: [
yang.require 'cord-core'
yang.require 'xos-core'
]
- data: require '../../sample-data.json'
+ controllers: [
+ 'restjson'
+ 'socket-io'
+ ]
+ views: [
+ ]
+ data: require '../../sample-data.json'
}
+app.run argv.port || 5050