Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

設定ファイルの呼び出しにおける問題 #1

Open
aokashi opened this issue Nov 6, 2017 · 0 comments
Open

設定ファイルの呼び出しにおける問題 #1

aokashi opened this issue Nov 6, 2017 · 0 comments

Comments

@aokashi
Copy link
Owner

aokashi commented Nov 6, 2017

現在、設定の json ファイルは require(jsonファイル) で直接呼び出して、設定が使えるようになっています。

しかし、キャッシュの都合もあるので jsonfile モジュールを利用して設定ファイルを呼び出す形に変えようかと思っています。この場合、呼び出しの処理を route ディレクトリ内の各モジュールにまで入れたくないので、設定ファイルを出力するモジュールを作りました。ただ、非同期処理の都合で何もファイルが得られず空データが取得されてしまい、現時点では正常に動いていません。

ここで、

  • 設定のjsonファイルは直接呼び出してもいいのか?
  • もし jsonfile とかで間接的に呼び出す場合は、設定ファイルを出力する箇所は同期処理でいいのか?

と悩む箇所があります。どのようにお考えでしょうか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant