# create app2.rb with the following code:
require 'sinatra'
get '/' do
erb :templ
end
# create a sub folder named views, name it as templ.erb with following code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>External template</title>
</head>
<body>
<h1>Worked!</h1>
</body>
</html>
#run it. see it in browser....
require 'sinatra'
get '/' do
erb :templ
end
# create a sub folder named views, name it as templ.erb with following code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>External template</title>
</head>
<body>
<h1>Worked!</h1>
</body>
</html>
#run it. see it in browser....
No comments:
Post a Comment