File tree 6 files changed +39
-0
lines changed
6 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ source 'https://rubygems.org/'
2
+
3
+ gem 'sinatra'
4
+ gem 'passenger'
Original file line number Diff line number Diff line change
1
+ {
2
+ "engine" : " builtin"
3
+ }
Original file line number Diff line number Diff line change
1
+ # Ruby sample app using Passenger web server
2
+
3
+ ## Building
4
+
5
+ ` pack build passenger-sample --buildpack gcr.io/paketo-community/ruby `
6
+
7
+ ## Running
8
+
9
+ ` docker run --interactive --tty --env PORT=8080 --publish 8080:8080 passenger-sample `
10
+
11
+ ## Viewing
12
+
13
+ ` curl http://localhost:8080 `
Original file line number Diff line number Diff line change
1
+ require 'sinatra/base'
2
+
3
+ class ExampleApp < Sinatra ::Base
4
+ get '/' do
5
+ erb :index
6
+ end
7
+ end
Original file line number Diff line number Diff line change
1
+ require File . absolute_path ( "app.rb" )
2
+
3
+ run ExampleApp
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < title > Powered By Paketo Buildpacks</ title >
5
+ </ head >
6
+ < body >
7
+ < img style ="display: block; margin-left: auto; margin-right: auto; width: 50%; " src ="https://paketo.io/images/paketo-logo-full-color.png "> </ img >
8
+ </ body >
9
+ </ html >
You can’t perform that action at this time.
0 commit comments