A Ruby Textile doc server

For an internal project, I need to publish dynamicaly some information about projects documentation. To provide such a service on a linux platform, I have choosen a ruby server solution.

Application structure

Based on Sinatra and RedCloth, I create a VERY small application server, contained into only one file (thanks sinatra).

 |_ pages/
 |  |_ index.textile
 |_ public/
 |  |_ css/
 |  |_ illustrations/
 |_ views/
 |  |_ main.erb
 |_ docserver.rb
 |_ README.md
  • docserver.rb is the server.
  • index.textile is the welcome page for the doc.
  • public folder contains css, images, and any javascript you will need.
  • the views/main.erb is the template used to generate the HTML pages served by thedocserver.rb.
  • README.md : this file !

Git repo project

You will found the git repo of this project on http://bitbucket.org/McGivrer/textile-doc-server


Before starting the server, please, install the dependencies:

$> sudo gem install sinatra RedCloth

Start server

To start the server, just execute the command line:

$> ruby docserver.rb


$> chmod +x docserver.rb
$> ./docserver.rb

And open your browser to http://localhost:4567/

Have Fun !



Les commentaires sont fermés.

Propulsé par WordPress.com.

Retour en haut ↑

%d blogueurs aiment cette page :