GitXplorerGitXplorer
a

sinatra-static-web

public
7 stars
8 forks
2 issues

Commits

List of commits on branch master.
Unverified
4b48edd3a46ce820b70637130ef32134ece5282f

Quick fixes for outdated dependencies

aandypiper committed 6 years ago
Unverified
d2271f805d9ac8a4ab6887a50cdf56c04eba4a1d

fixed manifest for CF v2

aandypiper committed 11 years ago
Unverified
9691502c1ff496405d6f953a57733271e42e9be7

Add LICENSE file via addalicense.com

aandypiper committed 11 years ago
Unverified
1afd86221ec1dcf099eee476a6864d214db5160e

Renamed manifest.yml

aandypiper committed 12 years ago
Unverified
880b7e7d8bbe783163d7fb7c12c191f5eba98292

Link to blog

aandypiper committed 12 years ago
Unverified
2b17b3193579c34d04cac69f42a84479620c07fa

Fixed manifest (trailing space in rename... doh)

aandypiper committed 12 years ago

README

The README file for this repository.

SimpleWeb

A trivial app to demonstrate serving of static content using the Sinatra framework in Ruby.

Some sample / placeholder content is provided (styled with Bootstrap) but the expectation is that the user will replace the contents of the public directory with files for static serving by the Ruby app.

Read more about the motivation for this on my blog.

Overview

This example uses:

Deployment

What are all these files?

Nothing, really. No, really. Everything in the public folder is there as a placeholder. All you need to get going is the web.rb file (well, OK, you need the Gemfile and config.ru too).

Put your own static web content (with an index.html file, and maybe a 404.html file) in the public folder, and either:

  • run bundle install then rackup from the root directory; or
  • deploy to Cloud Foundry as a Rack/Sinatra application

... and you are good to go.

Optionally, fiddle with the settings in the top of the web.rb file to tweak how things work.

There is an example Cloud Foundry manifest.yml(.example) file - if you wish to use this for one-push deployment, rename to manifest.yml and edit the name of the application to be something unique for your Cloud Foundry installation, or the push will fail.