671390ca24
New environment variable CUSTOM_LOCALE allows a user to define a locale per the /public/locales directory (this should be listed in the docs, will create a pull request for that too). If the environment variable is blank or invalid it reverts to previous behaviour of system + default locale. Fully tested the above as follows: CUSTOM_LOCALE = 'nl' < This works correctly, translating to nl. CUSTOM_LOCALE = 'HelloThere' < This reverts to previous behavior CUSTOM_LOCALE = '' < Also reverts #CUSTOM_LOCALE = < Also reverts |
||
---|---|---|
.. | ||
bin | ||
middleware | ||
routes | ||
storage | ||
clientConstants.js | ||
config.js | ||
fxa.js | ||
initScript.js | ||
layout.js | ||
limiter.js | ||
locale.js | ||
log.js | ||
metadata.js | ||
readme.md | ||
state.js |
Server Code
The server provides the API, serves static assets, and renders the pages for Send. The production entrypoint is prod.js and the development entrypoint is dev.js via webpack-dev-server
.
Server configuration
config.js contains the schema for our configuration options. Environment variables are the preferred method for setting configuration.
Middleware
Contains authentication and localization middleware.
Routes
Contains all the server routes and handlers for the API and pages
Storage
Contains implementations of possible storage engines for the files and metadata