Created
January 28, 2011 12:24
-
-
Save kei-q/800192 to your computer and use it in GitHub Desktop.
sinatra + slim + coffeescript sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sinatra + slim + coffee-script | |
enable shotgun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = File.expand_path "../", __FILE__ | |
require 'sinatra' | |
require 'slim' | |
require 'coffee-script' | |
require "#{path}/main" | |
run Sinatra::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/' do | |
slim :index | |
end | |
get '/application.js' do | |
coffee :application | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html | |
head | |
title test | |
body | |
h1 test | |
script(src="/application.js") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment