3.0.2 • Published 9 years ago
upnpserver v3.0.2
upnpserver
![]()
UpnpServer is a fast and light UPnP server written in NodeJS. This version does not need an external database (mysql, mongodb), it stores all information in memory.
Compatibility
- Freebox HD
- Soundbridge
- ht5streamer
- Intel Device Validator
- Samsung AllShare play
- LG Smart Share
- Android
- VPlayer (with UPNP Plugin)
- NX Player
Installation
$ npm install upnpserverCommand line
For command line, install upnpserver-cli package.
API Usage
var Server = require("upnpserver");
var server = new Server({ /* configuration, see below */ }, [
'/home/disk1',
{ path: '/home/myDisk' },
{ path: '/media/movies', mountPoint: '/My movies'},
{ path: '/media/albums', mountPoint: '/Personnal/My albums', type: 'music' }
]);
server.start();##Configuration Server constructor accepts an optional configuration object. At the moment, the following is supported:
logBoolean Enable/disable logging. Default: false.logLevelString Specifies log level to print. Possible values:TRACE,DEBUG,INFO,WARN,ERROR,FATAL. Defaults toERROR.nameString Name of server. Default 'Node Server'uuidString UUID of server. (If not specified, a UUID v4 will be generated)hostnameString Hostname to bind the server. Default: 0.0.0.0httpPortNumber Http port. Default: 10293dlnaSupportBoolean Enable/disable dlna support. Default: truestrictBoolean Use only official UPnP attributes. Default: falselangString Specify the language (en, fr) for virtual folder names. Default: enssdpLogBoolean Enable log of ssdp layer. Default: falsessdpLogLevelString Log level of ssdp layer.
Testing
For testing purposes used mocha framework. To run tests, you should do this:
make testAuthor
Olivier Oeuillot