Comments (2)
提案ありがとうございます。
結論から言いますと、その方法は誤った動作を引き起こしてしまいます。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.
対応ありがとうございました!
APP_ENV
を設定した上で更にRACK_ENV=deployment
の方も設定する必要があり、そちらは
$ bundle exec rackup -E deployment
としてもよい……ということですかね。
ありがとうございました!
from bcdice-api.
Related Issues (2)
- 不正なコマンドを受け取った際のエラーハンドリング HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcdice-api.