Sinatra Basics : Modular Sinatra Application
To learn how to create a modular Sinatra application.
Create hi.rb in your project folder.
require 'sinatra' class HelloWorld < Sinatra::Base get '/' do 'Hello, world!' end end
Create config.ru in your project folder.
require './hi' run HelloWorld
Run the application.
Browse to http://localhost:9292
In this article, you learned how to create a modular Sinatra application.
Ace the Technical Interview
- Easily find the gaps in your knowledge
- Get customized lessons based on where you are
- Take consistent action everyday
- Builtin accountability to keep you on track
- You will solve bigger problems over time
- Get the job of your dreams
Take the 30 Day Coding Skills Challenge
Gain confidence to attend the interview