Jamplay common module
This package include reuse module in jamplay web project
Config
There are 3 config type in Jamplay plattform
- Server Runtime Config (confident)
- Public Runtime Config (public, permanently config string)
- Remote Runtime Config (public, dynamtic config string)
Remote config setup
There are some serveral step to setup Remote Config
Requirement
- NAP_URL: because main Content data is NAP remote config need graphql endpoint to resolve it
- In
_document.js
: get config from remote and merge with__NEXT_DATA__
... in Document public static { return remoteConfig: remoteRuntimeConfig } { superprops props__NEXT_DATA__remoteRuntimeConfig = propsremoteConfig }
Or you can use
jamplay-common/client/_document
as your_document
class
- initial RemoteConfig singleton server
- when your server start, init your server singleton config by
call
init
await initconfig.NAP_GRAPHQL_URI