开发者

Starting Sinatra Web Application on Windows

开发者 https://www.devze.com 2023-04-05 13:11 出处:网络
I am new to Ruby/Sinatra but have inherited a Sinatra application. I read some documention but am looking for a just a simple way to run the existing Sinatra applicati开发者_如何学Con.

I am new to Ruby/Sinatra but have inherited a Sinatra application.

I read some documention but am looking for a just a simple way to run the existing Sinatra applicati开发者_如何学Con.

I've read that Sinatra-reloader is good to start use for development, but I'm just looking to actually startup the web application.

What's the command line command I use to start the application and specify the port? The application is currently configured with a config.ru file.


Use thin or some other webserver:

gem install thin

Then just pass in the rack config file(config.ru):

$ thin -R config.ru start
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop

the port in this case is 3000, point browser to 0.0.0.0:3000

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号