How do I get the app to listen on an address other than localhost?

10 views
Skip to first unread message

Tim Duffy

unread,
Aug 25, 2015, 9:45:33 AM8/25/15
to open-data-maker
Hello,

I was going to post this as an Issue, but it looked like the CONTRIBUTING.md file wanted me to post here ( I hope I interpreted that correctly ).

Looks like the ruby app is only listening on localhost ( 127.0.0.1:3000 ).  Where should I be looking for the configuration file to change this?

Thanks,

-TD

Sarah Allen

unread,
Sep 12, 2015, 3:09:00 PM9/12/15
to open-data-maker
Sorry for the delayed response.  We're using a ruby web framework called Padrino (which is a thin layer on top of the popular Sinatra framework).  You can find docs here:  http://www.padrinorb.com/guides/development-commands

You want the -p option.  For example, if you wanted to listen to port 4000 you could start the server like this:

padrino start -p 4000

Though in production, we're using Puma (http://puma.io/) to support multiple workers. You can see configuration here:  https://github.com/18F/open-data-maker/blob/dev/config/puma.rb

Sarah
Reply all
Reply to author
Forward
0 new messages