If you are hosting with Localhost, you need to use the webrick dependency. Install it on gem:

gem install webrick

Then, write a simple server. For example:

require 'webrick'
server = WEBrick::HTTPServer.new(Port: 8000)

# Shutdown the server on Ctrl + C
trap "INT" do
  server.shutdown
end

To activate NavyKit, you need to use the method use. It is highly recommended to activate NavyKit on the root/home path.

app = NavyKit::new

server.mount_proc "/" do |req, res|
  app.use(req, res)
end