4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

One liner server command in ruby

Have you ever wondered whether ruby has one liner server command equivalent to the python ? Turns out there is a similar command for ruby also.

Open your terminal, go to your desired directory where you want to run the server and enter the following:

ruby -run -e httpd . -p 5000

It will start a webserver runnning on your machine at port 5000. No extra gem is needed for this to run.

5 upvotes $2.58

Replies (4)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: