0.0.1 • Published 8 years ago

damson-server-http v0.0.1

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

damson-server-http

Inherits damson-server-core

Information

var damsonServer = require('damson-server-http');
damsonServer.start(8080);

start(port = 8080)

Starts HTTP server

Routes

  • /push?client=home-pc&task=send-message&driver=cli&message=Hello!

    damsonServer.pushTask('home-pc', {
      task_name: 'send-message',
      options: {
        message: 'Hello!'
      },
      driver_name: 'cli'
    });
    response.end();
  • /pop?client=home-pc

    var task = damsonServer.popTask('home-pc');
    response.end(task);
  • /ping

    response.end('pong')