Project

staticme

0.0
No commit activity in last 3 years
No release in over 3 years
Staticme is a very easy-to-use webserver built on top of Thin and Rack to serve static files in a directory provided as the webroot
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0.1
~> 3.12

Runtime

>= 1.6.4
>= 0
~> 1.6.3
 Project Readme

#StaticMe

Introduction

StaticMe is simple server for serving static content built on top of thin.

News

Version 0.4.0 has been released

The new version fixes the incompatibilities with ::Rack::File in new rack 1.6.4.

Version 0.3.0 has been released

This version introduces an automatic webpage reload functionality.

Staticme serves path /staticme/autoreload.js as a script src to provide the autoreload functionality.

Simply add a script tag to the bottom of any webpage:

<script type="text/javascript" src="/staticme/autoreload.js"></script>

Staticme will handle all fs evenes in the directory and broadcast 'em with "fs_event" through the websocket transport.

Installation

gem install staticme

Usage

Options:

  • -f, --path: path to be served in, current if omitted
  • -p, --port: port to bind, 8080 by default
  • -h, --host: host to start up, 0.0.0.0 by default
  • -i, --index: index file name, index.html by default
  • -ws, --ws_port: websocket port, 8090 by default. Available since 0.3.0

Starting up

In terminal:

cd my_project_folder
staticme
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:8080, CTRL+C to stop

In browser open page http://127.0.0.1:8080