Giter Club home page Giter Club logo

Comments (2)

ysakasin avatar ysakasin commented on July 28, 2024

提案ありがとうございます。

結論から言いますと、その方法は誤った動作を引き起こしてしまいます。BCDice-APIで想定されている方法は、環境変数としてAPP_ENV=productionを設定することです。

-o 0.0.0.0でも一見動作するように見えますが、エラーが発生した時に詳細なエラーを発生させてしまいます。これは、sinatraがAPP_ENVを見て動作を決定しているためです。APP_ENV=productionにすることで、ご指摘のlocalhostしかリッスンしない問題も解決されます。BCDice-APIでも、このAPP_ENVを見て動作を変えている点がいくつかあります。
https://github.com/sinatra/sinatra#configuration

また、READMEの表記はあくまでローカル実行用のコマンドを想定していました。実運用のコマンドがないのは不親切かなと思いますので、docs/に解説を追加しようと思います。

from bcdice-api.

liruk avatar liruk commented on July 28, 2024

対応ありがとうございました!
APP_ENVを設定した上で更にRACK_ENV=deploymentの方も設定する必要があり、そちらは
$ bundle exec rackup -E deployment
としてもよい……ということですかね。
ありがとうございました!

from bcdice-api.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.