123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680 |
- const express = require("express");
- const execSync = require('child_process').execSync;
- var parser = require('xml2json');
- const fs = require('fs');
- const redis = require('redis');
- var cors = require('cors');
- const client = redis.createClient();
- const app = express();
- app.use(cors());
- const port = 3001;
- //client.connect('127.0.0.1', 6379);
- const jsn = require("./base.json");
- const di = require("./di.json");
- const ia = require("./ia.json");
- const mach = require("./machinery.json");
- const mt = require("./mt.json");
- let ns_array = [];
- //console.log(typeof jsn);
- //console.log(jsn.UANodeSet.UAObject.find( record => record.NodeId === "i=84"));
- client.on('connect', function(){
- console.log('Connected.');
- });
-
- async function redis_set(shorty, data){
- await client.json.set(shorty,'.',data);
- }
- function inverse(dev){
- if("IsForward" in dev){
- if(dev.IsForward === "false"){
- return true;
-
- }else{
- return false;
- }
- }else{
- return false;
- }
- }
- function forward(dev){
- var b = true;
- if("IsForward" in dev){
- if(dev.IsForward === "false"){
- b = false;
- }
- }else{
- b = true;
- }
- return b;
- }
- function sortNS(files){
- let nsets = [];
-
- for(let x = 0; x<files.length; x++){
- if("RequiredModel" in files[x].UANodeSet.Models.Model){
- if(Array.isArray(files[x].UANodeSet.Models.Model.RequiredModel)){
- var len = files[x].UANodeSet.Models.Model.RequiredModel.length;
- for(let y = 0; y < len; y++){
- files[x].UANodeSet.Models.Model.RequiredModel[y]
- }
- }else{
-
- }
- }else{
- nsets.push(files[x].UANodeSet.Models.Model.ModelUri);
- }
- }
- }
- function get_Children(jsnob, nid, ret_obj){
- const entities = ['UAObjectType','UAObject','UAVariableType','UAVariable', 'UADataType', 'UAReferenceType', 'UAMethod'];
- const set = jsnob.UANodeSet;
- for(let i = 0; i< entities.length; i++){
- if(entities[i] in set){}
- }
-
- try{
- if(Array.isArray(jsnob.UANodeSet.UAObject)){
- for (let i = 0; i < jsnob.UANodeSet.UAObject.length;i++){
- if(Array.isArray(jsnob.UANodeSet.UAObject[i].References.Reference)){
- for (let x = 0; x < jsnob.UANodeSet.UAObject[i].References.Reference.length;x++){
- if(jsnob.UANodeSet.UAObject[i].References.Reference[x].$t === nid){
- if(inverse(jsnob.UANodeSet.UAObject[i].References.Reference[x])){
- let zobj= overwriteNode(jsnob.UANodeSet.UAObject[i], nid, "UAObject", getIndexArray(jsnob));
- /*let zobj = {
- id: jsnob.UANodeSet.UAObject[i].NodeId,
- text: jsnob.UANodeSet.UAObject[i].DisplayName,
- ReferenceType: jsnob.UANodeSet.UAObject[i].References.Reference[x].ReferenceType,
- IsForward: forward(jsnob.UANodeSet.UAObject[i].References.Reference[x]),
- }*/
- if(!checkDouble(zobj,ret_obj)){
- ret_obj.push(zobj);
- }
- }
- }
- }
- }else{
- if(jsnob.UANodeSet.UAObject[i].References.Reference.$t === nid){
- //console.log(jsnob.UANodeSet.UAObject[i].BrowseName + inverse(jsnob.UANodeSet.UAObject[i].References.Reference) +jsnob.UANodeSet.UAObject[i].References.Reference.ReferenceType);
- if(inverse(jsnob.UANodeSet.UAObject[i].References.Reference)){
- let zobj= overwriteNode(jsnob.UANodeSet.UAObject[i], nid, "UAObject", getIndexArray(jsnob));
- /*let zobj = {
- id: jsnob.UANodeSet.UAObject[i].NodeId,
- text: jsnob.UANodeSet.UAObject[i].DisplayName,
- ReferenceType: jsnob.UANodeSet.UAObject[i].References.Reference.ReferenceType,
- IsForward: forward(jsnob.UANodeSet.UAObject[i].References.Reference),
- }*/
- if(!checkDouble(zobj,ret_obj)){
- ret_obj.push(zobj);
- }
- }
- }
- }
- }
- }else{
- if(Array.isArray(jsnob.UANodeSet.UAObject.References.Reference)){
- for (let x = 0; x < jsnob.UANodeSet.UAObject.References.Reference.length;x++){
- if(jsnob.UANodeSet.UAObject.References.Reference[x].$t === nid){
- //console.log(jsnob.UANodeSet.UAObject.BrowseName + inverse(jsnob.UANodeSet.UAObject.References.Reference[x]) +jsnob.UANodeSet.UAObject.References.Reference[x].ReferenceType);
- if(inverse(jsnob.UANodeSet.UAObject.References.Reference[x])){
- let zobj= overwriteNode(jsnob.UANodeSet.UAObject, nid, "UAObject", getIndexArray(jsnob));
- /*let zobj = {
- id: jsnob.UANodeSet.UAObject.NodeId,
- text: jsnob.UANodeSet.UAObject[i].DisplayName,
- ReferenceType: jsnob.UANodeSet.UAObject.References.Reference[x].ReferenceType,
- IsForward: forward(jsnob.UANodeSet.UAObject.References.Reference[x]),
- }*/
- if(!checkDouble(zobj,ret_obj)){
- ret_obj.push(zobj);
- }
- }
- }
- }
- }else{
- if(jsnob.UANodeSet.UAObject.References.Reference.$t === nid){
- //console.log(jsnob.UANodeSet.UAObject.BrowseName + inverse(jsnob.UANodeSet.UAObject.References.Reference) +jsnob.UANodeSet.UAObject.References.Reference.ReferenceType);
- if(inverse(jsnob.UANodeSet.UAObject.References.Reference)){
- let zobj= overwriteNode(jsnob.UANodeSet.UAObject, nid, "UAObject", getIndexArray(jsnob));
- /*let zobj = {
- id: jsnob.UANodeSet.UAObject.NodeId,
- text: jsnob.UANodeSet.UAObject.DisplayName,
- ReferenceType: jsnob.UANodeSet.UAObject.References.Reference.ReferenceType,
- IsForward: forward(jsnob.UANodeSet.UAObject.References.Reference),
- }*/
- if(!checkDouble(zobj,ret_obj)){
- ret_obj.push(zobj);
- }
- }
- }
- }
- }
- }catch(err){
- console.log("NOK");
- }
- }
- function getAllChildren(nid, ret_obj){
- for(let ix = 0; ix < ns_array.length; ix++){
- get_Children(ns_array[ix][0], nid, ret_obj);
- }
- }
- function getIndexObj(jsnob, ns){
- var uri = ns.UANodeSet.Models.Model.ModelUri;
- if(uri == "http://opcfoundation.org/UA/"){
- return 0;
- }
- console.log(uri);
- let uris = {};
- if(jsnob.UANodeSet.NamespaceUris != undefined){
- uris = jsnob.UANodeSet.NamespaceUris.Uri;
- console.log(uris);
- }else{
- return 0;
- }
- for(let i = 0; i < uris.length; i++){
- console.log(uris[i]);
- if(uris[i] == uri){
- return i+1;
- }
- }
- return undefined;
- }
- function getIndexName(jsnob, name){
- if(name == "http://opcfoundation.org/UA/"){
- return 0;
- }
- let uris = {};
- if(jsnob.UANodeSet.NamespaceUris != undefined){
- uris = jsnob.UANodeSet.NamespaceUris.Uri;
- }else{
- return 0;
- }
- for(let i = 0; i < uris.length; i++){
- if(uris[i] == name){
- return i+1;
- }
- }
- return undefined;
- }
- function getIndexArray(tobj){
- for(let i = 0; i < ns_array.length;i++){
- console.log(ns_array[i][1]);
- if(tobj.UANodeSet.Models.Model.ModelUri === ns_array[i][0].UANodeSet.Models.Model.ModelUri){
- return i;
- }
- }
- return undefined;
- }
- function getNode(jsnob, ns, id){
- let uris = {};
- var ns_uri = '';
- if(jsnob.UANodeSet.NamespaceUris){
- uris = jsnob.UANodeSet.NamespaceUris.Uri;
- ns_uri = uris[ns-1];
- }
- for(let i = 0; i < ns_array.length; i++){
- if(ns_array[i][0].UANodeSet.Models.Model.ModelUri == ns_uri){
- return i;
- }
- }
- return -1;
- }
- function overwriteNode(nobj, nid, nc, ns){
- const node = {
- id:nobj.NodeId,
- text:nobj.DisplayName,
- children: true,
- data:{
- browsename: nobj.BrowseName,
- namespace: ns,
- nodeclass: nc,
- parentNode: nid,
- parentid: "ParentNodeId" in nobj ? nobj.ParentNodeId : null,
- description: "Description" in nobj ? nobj.Description : null,
- notifier: "EventNotifier" in nobj ? nobj.EventNotifier : null, //Object
- isabstract: "IsAbstract" in nobj ? nobj.IsAbstract : null, //ObjectType
- datatype: "DataType" in nobj ? nobj.DataType : null, //Variable
- value: "Value" in nobj ? nobj.Value : null, //Variable
- arraydimensions: "ArrayDimensions" in nobj ? nobj.ArrayDimensions : null, //Variable
- references: "References" in nobj ? nobj.References : null
- }
-
- }
- return node;
- }
- function searchNode(id){
- const entities = ['UAObjectType','UAObject','UAVariableType','UAVariable', 'UADataType', 'UAReferenceType', 'UAMethod']; //7
- var nid = "";
- var jsnob = {};
- if(id.includes("ns=")){
- var ns = id.substring(id.length - 4);
- const ns1 = ns.split(";");
- var nsidx = parseInt(ns1[0]);
- jsnob = ns_array[nsidx][0];
- }else{
- nid = id;
- jsnob = ns_array[0][0];
- }
- const set = jsnob.UANodeSet;
- for(let i = 0; i< entities.length; i++){
- if(entities[i] in set){
- console.log(set.Models.Model.ModelUri+" has a "+entities[i]);
- if(Array.isArray(set[entities[i]])){
- for(let x = 0; x < set[entities[i]].length;x++){
- if(set[entities[i]][x].NodeId === nid){
- let nobj = set[entities[i]][x];
- const node = overwriteNode(nobj, null, entities[i], getIndexArray(jsnob));
- return node;
- }
- }
- }
- }
- }
- return null;
- }
- async function redis_get(){
- try{
- const val = await client.json.get('mt',{
- path:'.UANodeSet.Models.Model.Version',
- });
- console.log(`Value is: ${val}`);}catch(err){
- console.log("NOK");
- }
- }
- async function redis_flush(){
- await client.sendCommand(['FLUSHALL']);
- }
- function p2json(name, shorty){
- try{
- const nn = name+".xml";
- var nnn = shorty+".json";
- fs.readFile( nn, function(err, data){
- //fs.readFile( "Opc.Ua.NodeSet2.xml", function(err, data){
- let jsn = parser.toJson(data);
- fs.writeFileSync(nnn, jsn);
- });
- }catch(err){
- console.log('not work');}
- }
- app.get('/setredis/:ident',(req, res) =>{
- try{
- var shorty = req.params["ident"];
- const id = './'+shorty+".json";
- const fl = require(id);
- redis_set(shorty, fl);
- res.json({result:"OK"});
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK"});
- }
- })
- app.get('/requirejson/:ident/:name',(req, res) =>{
- try{
- var namejs = req.params["name"];
- var shorty = req.params["ident"];
- const id = "./"+namejs+".json";
- const fl = require(id);
- for(let i = 0; i < ns_array.length; i++){
- if(ns_array[i][1] === shorty){
- return res.json({result:"Array already includes element."})
- }
- }
- ns_array.push([fl, shorty, fl.UANodeSet.Models.Model.ModelUri]);
- res.json({result:"OK"});
-
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK", error: "Json file may not be available. Call list json files."});
- }
- })
- app.get('/shownsarray',(req, res) =>{
- try{ let str = '';
- for(let i = 0; i < ns_array.length; i++){
- str += '('+i+': '+ns_array[i][1]+')';
- }
- res.json({result:str});
- console.log(ns_array);
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK", error: "Json file may not be available. Call list json files."});
- }
- })
- app.get('/getredis',(req, res) =>{
- try{
- redis_get();
- res.json({result:"OK"});
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK"});
- }
- })
- app.get('/get_root',(req, res) =>{
- try{
- let rt = jsn.UANodeSet.UAObject.find( record => record.NodeId === "i=84");
- let resj = {
- id: rt.NodeId,
- parent: "#",
- text: rt.DisplayName};
- res.json(resj);
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK"});
- }
- })
- app.get('/get_children/base/:id',(req, res) =>{
- var nid = req.params["id"];
- try{
- if(Array.isArray(jsn.UANodeSet.UAObject)){
- for (let i = 0; i < jsn.UANodeSet.UAObject.length;i++){
- if(Array.isArray(jsn.UANodeSet.UAObject[i].References.Reference)){
- for (let x = 0; x < jsn.UANodeSet.UAObject[i].References.Reference.length;x++){
- if(jsn.UANodeSet.UAObject[i].References.Reference[x].$t === nid){
- console.log(jsn.UANodeSet.UAObject[i].BrowseName + inverse(jsn.UANodeSet.UAObject[i].References.Reference[x]) +jsn.UANodeSet.UAObject[i].References.Reference[x].ReferenceType);
- }
- }
- }else{
- if(jsn.UANodeSet.UAObject[i].References.Reference.$t === nid){
- console.log(jsn.UANodeSet.UAObject[i].BrowseName + inverse(jsn.UANodeSet.UAObject[i].References.Reference) +jsn.UANodeSet.UAObject[i].References.Reference.ReferenceType);
- }
- }
- }
- }else{
- if(Array.isArray(jsn.UANodeSet.UAObject.References.Reference)){
- for (let x = 0; x < jsn.UANodeSet.UAObject.References.Reference.length;x++){
- if(jsn.UANodeSet.UAObject[i].References.Reference[x].$t === nid){
- console.log(jsn.UANodeSet.UAObject[i].BrowseName + inverse(jsn.UANodeSet.UAObject.References.Reference[x]) +jsn.UANodeSet.UAObject.References.Reference[x].ReferenceType);
- }
- }
- }else{
- if(jsn.UANodeSet.UAObject.References.Reference.$t === nid){
- console.log(jsn.UANodeSet.UAObject.BrowseName + inverse(jsn.UANodeSet.UAObject.References.Reference) +jsn.UANodeSet.UAObject.References.Reference.ReferenceType);
- }
- }
- }
- console.log('');
- res.json({result:"OK"});
- }catch(err){
- console.log("NOK");
- res.json({result:"NOK"});
- }
- })
- app.get('/get_children/all/:ns/:id',(req, res) =>{
- var ret_obj = [];
- var ns = req.params["ns"];
- var id = req.params["id"];
- var nid = 'ns='+ns+';'+'i='+id;
- console.log(nid);
- get_Children(di, nid, ret_obj);
- get_Children(ia, nid, ret_obj);
- get_Children(mach, nid, ret_obj);
- get_Children(mt, nid, ret_obj);
-
- res.json(ret_obj);
- })
- app.get('/getNode/all/:ns/:id',(req, res) =>{
- var ret_obj = [];
- var ns = req.params["ns"];
- var id = req.params["id"];
- var nid = 'ns='+ns+';'+'i='+id;
- console.log(nid);
- get_Children(di, nid, ret_obj);
- get_Children(ia, nid, ret_obj);
- get_Children(mach, nid, ret_obj);
- get_Children(mt, nid, ret_obj);
- let node = {
- id:nid,
- text: "home",
- children:ret_obj
- }
- res.json(node);
- })
- app.get('/flushall',(req, res) =>{
- redis_flush();
- res.json({result:"OK"});
- })
- app.get('/p2json/:nodeset/:ident',(req, res) =>{
- var name = req.params["nodeset"];
- var shorty = req.params["ident"];
- p2json(name, shorty);
- res.json({result:"OK"});
- })
- app.get('/list_projects', (req, res) => { //reacts to requests -> /list_projects
- const output = execSync("cd .. && cd Projects && ls", { encoding: 'utf-8' });
- var out = output.split("\n");
- if(out[out.length-1] === ""){
- out.splice(-1,1);
- }
- console.log("Response: ", out);
- res.json({result:out});
- })
-
- app.get('/list_nodesets', (req, res) => { //reacts to requests -> /list_nodesets
- const output = execSync("cd .. && cd nodesets && ls", { encoding: 'utf-8' });
- var out = output.split("\n");
- var result = [];
- for(let i = 0; i < out.length; i++){
- if(out[i].includes(".xml")){
- result.push(out[i]);
- }
- }
- console.log("Response: ", result);
- res.json({result:result});
- })
- app.get('/new_project', (req, res) => { //reacts to requests -> /new_project?name=myproject
- const name = req.query.name; //project name
- const output = execSync("cd .. && cd Projects && ls", { encoding: 'utf-8' });
- var out = output.split("\n");
- var result = "";
- var err = "Error - Project already exists.";
- for(let i = 0; i < out.length; i++){
- if(out[i] === name){
- return res.json({result:err});
- }
- }
- const dir = execSync("cd .. && cd Projects && mkdir "+name, { encoding: 'utf-8' });
-
- var cp = execSync("sudo cp /home/pi/ModelingTool/nodesets/Opc.Ua.NodeSet2.xml /home/pi/ModelingTool/Projects/"+name+"/Opc.Ua.NodeSet2.xml", { encoding: 'utf-8' });
- cp = execSync("sudo cp /home/pi/ModelingTool/nodesets/Opc.Ua.NodeSet2.json /home/pi/ModelingTool/Projects/"+name+"/Opc.Ua.NodeSet2.json", { encoding: 'utf-8' });
- const cur_dir = execSync("cd .. && cd Projects && cd "+name+" && ls", { encoding: 'utf-8' });
- console.log("New Project was created.");
- res.json({result:cur_dir});
- })
-
- app.get('/save_project', (req, res) => { //reacts to requests -> /save_project?name=myproject
- const name = req.query.name; //project name
- const output = execSync("sudo cp /var/www/html/root.json /home/pi/ModelingTool/Projects/"+name+"/"+name+".json", { encoding: 'utf-8' });
- console.log("Project "+name+" was saved.");
- res.json({result:"Project saved"});
- })
-
- app.get('/load_json', (req, res) => { //reacts to requests -> /load_json?name=myproject
- const name = req.query.name; //project name
- var output = execSync("cd .. && cd Projects && ls", { encoding: 'utf-8' });
- var out = output.split("\n");
- var result = "";
- var err = "Error - Project or file not available.";
- for(let i = 0; i < out.length; i++){
- if(out[i] === name){
- var output1 = execSync("cd .. && cd Projects && cd "+name+" && ls", { encoding: 'utf-8' });
- var out1 = output1.split("\n");
- var chk = name+".json"
- for(let y = 0; y < out1.length; y++){
- if(out1[y] === chk){
- result = execSync("sudo cp /home/pi/ModelingTool/Projects/"+name+"/"+name+".json /var/www/html/root.json", { encoding: 'utf-8' });
- console.log("Project has been loaded.");
- return res.json({result:"Project loaded"});
- }
- }
- }
- }
-
- res.json({result:err});
- })
-
-
- app.get('/root', (req, res) => { //reacts to requests -> /root
- console.log("Return root.");
- res.json([{id:"i=84",text:"Root",children:[{id:"i=85",text:"Objects",children:true},{id:"i=86",text:"Types", children:true},{id:"i=87",text:"View",children:false}]}]);
- })
- function isChildRef(obj){
- if('IsForward' in obj && obj.IsForward === 'false'){
- return false;
- }
- if('IsForward' in obj && obj.IsForward === 'true'){
- switch (obj.ReferenceType) {
- case 'Organizes': return true;
- case 'HasComponent': return true;
- case 'HasProperty': return true;
- case 'HasAddIn': return true;
- default: return false;
- }
- }
- switch (obj.ReferenceType) {
- case 'Organizes': return true;
- case 'HasComponent': return true;
- case 'HasProperty': return true;
- case 'HasAddIn': return true;
- default: return false;
- }
-
- return false;
- }
- function checkDouble(item, obj){
- for(let i = 0; i < obj.length; i++){
- if(item.id === obj[i].id){
- return true;
- }
- }
- return false;
- }
- app.get('/lazy', (req, res) => {
- //console.log(req);
- var ret_obj = [];
- let node = {};
- if(req.query.id == "#"){
- //res.json([{id:"i=84",text:"Root",data:{nodeclass:"Object"},children:true}]);
- res.json([{id:"i=84",text:"Root",data:{nodeclass:"Object"},children:[{id:"i=85",text:"Objects",data:{nodeclass:"Objects"},children:true},{id:"i=86",text:"Types", data:{nodeclass:"Objects"},children:true},{id:"i=87",text:"View",data:{nodeclass:"Objects"},children:true}]}]);
- }
- var nid = req.query.id;
- node = searchNode(nid);
- if(node.data.references != null){
- console.log("Here:"+node.data.references);
- if(Array.isArray(node.data.references.Reference)){
- console.log("And:"+node.data.references.Reference);
- for(let x = 0; x < node.data.references.Reference.length; x++ ){
- if(isChildRef(node.data.references.Reference[x])){
- var cnode = searchNode(node.data.references.Reference[x].$t);
- if(!checkDouble(cnode,ret_obj)){
- ret_obj.push(cnode);
- }
- }
- }
-
- }else{
- console.log("But:"+node.data.references);
- if(isChildRef(node.data.references)){
- var cnode = searchNode(node.data.references.$t);
- if(!checkDouble(cnode,ret_obj)){
- ret_obj.push(cnode);
- }
- }
- }
- }
- getAllChildren(nid, ret_obj);
- console.log(ret_obj);
- res.json(ret_obj);
- });
- app.get('/index/:ns1/:ns2', (req, res) => {
- var n1 = req.params["ns1"];
- var n2 = req.params["ns2"];
- var num = getIndexObj(ns_array[n1][0],ns_array[n2][0]);
- console.log(getNode(ns_array[3][0],2,15048));
- res.send("Index of "+ns_array[n2][1]+' in '+ns_array[n1][1]+' is '+num);
- });
- app.get('/test/:id', (req, res) => { //test
- var n1 = parseInt(req.params["id"]);
- console.log(ns_array[n1][1],);
- var ret = searchNode("i=85");
- console.log(ret);
- res.send("All good");
- //res.json([{id:"i=84",text:"Root",children:[{id:"i=85",text:"Objects",children:true},{id:"i=86",text:"Types", children:true},{id:"i=87",text:"View",children:false}]}]);
- })
- app.get('/require/all', (req, res) => { //test
- ns_array.push([jsn, "base", jsn.UANodeSet.Models.Model.ModelUri]);
- ns_array.push([di, "di", di.UANodeSet.Models.Model.ModelUri]);
- ns_array.push([ia, "ia", ia.UANodeSet.Models.Model.ModelUri]);
- ns_array.push([mach, "mach", mach.UANodeSet.Models.Model.ModelUri]);
- ns_array.push([mt, "mt", mt.UANodeSet.Models.Model.ModelUri]);
- res.json({result:"OK"});
- })
-
-
- app.listen(port, () => {
- console.log("Server listening at http://localhost:", port);
- })
|