Configure your Server
In this document, you’ll learn what configurations you can add to your Arialshop server and how to change them.
This document assumes you already have installed Arialshop.
Arialshop Configurations File
There are 4 configuration files and are located inside
store-front/src/lib/config/index.js. This includes Database, Redis, Search among other configurations.
In your configurations, you’ll often use environment variables. For example, when using API keys or setting your database URL.
By default, Arialshop loads environment variables from the system’s environment variables. Any different method you prefer to use or other location you’d prefer to load environment variables from you need to manually implement.
Arialshop supports MongoDB database and it is configured through
.env file inside
<YOUR_DATABASE_URL> is the URL of your MongoDB database.
Arialshop uses Redis to handle the session management, among other usages. You need to set Redis URL in the configurations:
<YOUR_REDIS_URL> is the URL of your Redis server.
Arialshop uses session based authentication to handle user authentication.
SESSION_SECRET is defined from envirnoment variables To set the session secret:
Arialshop uses Cross-Origin Resource Sharing (CORS) to only allow specific origins to access the server.
The Admin and the Core have different CORS configurations that must be configured.
For both of the Admin and the Core CORS configurations, the value is expected to be a string. This string can be a comma-separated list of accepted origins. Every origin in that list can be of the following types:
- The accepted origin as is. For example,
- A regular expression pattern that can match more than one origin. For example,
*.example.com. The regex pattern that the server tests for is
More details about cors configuration is defined inside Core Config
CORS is the URL of your admin, storefront dashboard. By default, it’s