Skip to content
Snippets Groups Projects
Commit 6e630d49 authored by wactbprot's avatar wactbprot
Browse files

api call struct

parent 66d76ce2
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
* welcher die _REST_-Api des _ssmp_ zur Verfügung stellt.
*
*/
(function() {
module.exports = function(cb) {
var _ = require("underscore")
, prog = require("commander")
, restify = require("restify")
......@@ -258,13 +258,18 @@
//
mem.get(["defaults"], function(err, defaults){
server.listen(defaults.http.port, function() {
log.trace(ok
, "\n"
+ ".....................................\n"
+ "json api up and running\n"
+ "http://localhost:" + defaults.http.port +"\n"
+ ".....................................\n"
);
if(_.isFunction(cb)){
log.trace(ok
, "\n"
+ ".....................................\n"
+ "json api up and running\n"
+ "http://localhost:" + defaults.http.port +"\n"
+ ".....................................\n"
);
, "try to exec call back");
cb();
}
});
});// defaults
})()
}
#!/usr/bin/env node
// require('look').start(3000, '127.0.0.1');
require("../api/api")();
......@@ -4,7 +4,10 @@ require("../server")(
function(){
require("../clients")(
function(){
require("..//api/api.js")
require("../api/api")(function(
){
console.log("start frame as a second process");
})
}
)
}
......
......@@ -2,7 +2,7 @@
"author": "wactbprot",
"name": "ssmp",
"description": "server side measurment program",
"version": "0.9.0",
"version": "0.9.2",
"repository": {
"type": "git",
"url": "https://github.com/wactbprot/ssmp"
......@@ -24,8 +24,8 @@
"start": "bin/start | bunyan -o short",
"server": "bin/server | bunyan -o short",
"clients": "bin/clients | bunyan -o short",
"api":"bin/api | bunyan -o short",
"info":"node ./info/info.js | bunyan -o short",
"api":"node ./api/api.js | bunyan -o short",
"test": "mocha | bunyan -l 100",
"cover": "istanbul cover _mocha -- -R spec | bunyan -l 100"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment