Skip to content

thromera/pns-dockerAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plug'n'Stream DockerAPI

PlugAndStream Server API to launch Docker container at will.

This little server permits to create RTMP servers by launching containers through an API.

##Install the image and run the server

For the server to run, you need to create the Docker image on the machine running the API:

$ git clone https://github.com/jstoja/pns-dockerAPI
$ cd pns-dockerAPI/
$ docker build -t pns:server .

Note: On Windows and OSX you need to install boot2docker. More information here...

Then, you need to build and run the Go application:

$ go build
$ ./pns-dockerAPI

##API

###Create a container

➜  ~  curl http://localhost:3001/new/stream_conference_lyon
{"Id":1,"Name":"stream_conference_lyon","PortRTMP":1935,"PortFLV":1234}%

###List containers

➜  ~  curl http://localhost:3001/list
* &{1 stream_conference_lyon 1935 1234}
* <nil>
* <nil>
* <nil>
* <nil>

###Delete a container

➜  ~  curl http://localhost:3001/delete/1
{}%

About

PlugAndStream Server API to launch Docker container at will

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 67.5%
  • Shell 32.5%