ruby目录_使用Ruby服务目录

ruby目录

Quickly serving a directory using PHP, Node.js, or Python allows for quick testing with as little hassle as possible.  Imagine having to stand up apache or another server just to serve a directory -- gross!  Since I had touched the three important languages, I looked to Ruby, a language I have very little experience with.

使用PHPNode.jsPython快速为目录提供服务,可以尽可能快速地进行测试。 想象一下,仅为了服务目录就不得不站起来使用Apache或其他服务器-太糟糕了! 因为我接触了三种重要的语言,所以我寻找了Ruby,这是我很少有的经验。

It turns out that serving a directory with Ruby is as easy as the other languages:

事实证明,使用Ruby提供目录与其他语言一样容易:

ruby -run -e httpd . -p 8080

The -p argument obviously represents the port, so hitting localhost:8080 will get you to the served directory!

-p参数显然表示端口,因此按localhost:8080将使您进入服务目录!

翻译自: https://davidwalsh.name/serve-directory-ruby

ruby目录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值