insoftpub / storefront

ReactJS Storefront
85 stars 34 forks source link

Configure Schema ID/Key #1

Closed ericingram closed 1 year ago

ericingram commented 7 years ago

What's the right way to configure Schema ID/Key?

vmajsuk commented 7 years ago

Hi Eric! First, you'll need to get your Schema Client ID and Schema Secret Key from the Schema.io, they can be found at Admin > Settings > Account at the API Keys tab. Then you'll need to configure them in the project. To do this, open /servers/api/config.js and edit auth.schemaIO.clientId and auth.schemaIO.clientSecret properties.

ericingram commented 7 years ago

@vmajsuk Thanks!

I'm wondering about dev vs production, how would you recommend setting these configs for different environments?

vmajsuk commented 7 years ago

@ericingram for the most part, server configs store some services' ids and keys, so they are similar for dev and production. The only thing i can recall is you can change CACHE_MAX_AGE in /servers/static/config.js

ericingram commented 7 years ago

I think it would be ideal to support ENV variables for these configurations, as an override to the hard coded configs at least.

isdminch commented 7 years ago

Agreed, will be easier and secure to maintain boilerplate code base with ENV variables at PM2 ecosystem file instead. Else we may accidentally commit private data of the demo store to public repo. I will create TODO.