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