GithubHelp home page GithubHelp logo

rcrath / kraken Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vincent-petithory/kraken

0.0 2.0 0.0 396 KB

HTTP server for on-demand http servers serving static files

License: MIT License

Go 100.00%

kraken's Introduction

kraken is a on-demand http server: you can create new http servers at runtime through a RESTful API or one of the available clients. Those servers are meant to serve static files. It needs almost no configuration and can (will) save state across restarts.

Typical uses are sharing files quickly, on LAN or from a remote box. If you happen to often use python -m http.server, then this project should be of interest.

Install Build Status

Kraken is written in Go. The first step is to install Go on your system, if it isn't done yet.

Go is packaged for most linux distributions, but you can install it from a binary distribution or from source. To install the kraken programs, do go get github.com/vincent-petithory/kraken/... You can update an installation of kraken with go get -u github.com/vincent-petithory/kraken/...

Upon install, krakend and krakenctl are available.

There's also a PKGBUILD for Archlinux on AUR.

Quickstart

$ # Start the server
$ krakend
2014/08/22 16:50:17 [admin] Listening on 127.0.0.1:4214
2014/08/22 16:50:17 [admin] Available on http://127.0.0.1:4214

Here's a sample session, using the krakenctl client. It creates a http server and makes it serve $HOME/Pictures on http://localhost:4567/pics.

$ # Create a http server listening on port 4567, and bind it to localhost.
$ krakenctl add --bind=localhost 4567
server available on 127.0.0.1:4567
$ # Make it serve $HOME/Pictures mounted on /pics
$ krakenctl mount 4567 --target=/pics $HOME/Pictures
8f71ae0: /home/meow/Pictures -> /pics
$ # Print a status
$ krakenctl ls
127.0.0.1:4567
  * 8f71ae0: /home/vincent/Pictures -> /pics
$ # View contents in a browser
$ xdg-open http://localhost:4567/pics

Run:

krakenctl help

For help on all available commands.

Events

It is possible to monitor krakend activity by listening to events.

There are 3 kind of events:

  • server: a http server was created or deleted,
  • mount: a mount point has been created, deleted or updated on one http server,
  • fileserve: a file was served by a server on a mount point.

To listen to events, simply run

krakenctl events

This will listen to all events. To limit listening to only certain kind of events:

krakenctl events server mount

kraken's People

Contributors

vincent-petithory avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.