-
Notifications
You must be signed in to change notification settings - Fork 872
Configuration
All settings can be made in the config file and some settings can also be managed from the admin panel (http://127.0.0.1:1111/admin).
Settings are stored in JSON files in the /config
directory. The main application-level settings are stored in /config/settings.json
while payment gateway settings are stored in files in the /config
directory named after the payment gateway. For example, configuration for the Stripe payment gateway is stored in /config/payment/config/stripe.json
.
Configs are validated against the schema files. For the settings.json
this will be validated against the settingsSchema.json
file. The Payment gateway config is validated against the /config/payment/schema/<gateway>.json
file.
Environment configuration can be achieved using an env.yaml
file (in the root of the app) to override any settings. You may want to do something like:
development:
port: 1111
databaseConnectionString: mongodb://127.0.0.1:27017/expresscart
production:
port: 2222
databaseConnectionString: mongodb://prod_db_url:27017/expresscart
The app will read in the NODE_ENV
and switch and override any valid settings. Eg: databaseConnectionString
set in the env.yaml
file will override anything in settings.json
file.
This can also be used for payment modules too. Any settings in the env.yaml
file will override the /config/payment/config/<gateway>.json
file.
Property | Description |
---|---|
cartTitle | Test1 |
cartDescription | Test1 |
cartLogo | Test1 |
baseUrl | Test1 |
emailHost | Test1 |
emailPort | Test1 |
emailSecure | Test1 |
emailUser | Test1 |
emailPassword | Test1 |
emailAddress | Test1 |
productsPerRow | Test1 |
productsPerPage | Test1 |
footerHtml | Test1 |
googleAnalytics | Test1 |
injectJs | Test1 |
customCss | Test1 |
currencySymbol | Test1 |
currencyISO | Test1 |
paymentGateway | Test1 |
databaseConnectionString | Test1 |
theme | Test1 |
trackStock | Test1 |
orderHook | Test1 |
availableLanguages | Test1 |
defaultLocale | Test1 |
maxQuantity | Test1 |
twitterHandle | Test1 |
facebookAppId | Test1 |
productOrderBy | Test1 |
productOrderBy | Test1 |
productOrderBy | Test1 |
productOrderBy | Test1 |