proxy-seller-ssr
v1.0.1
Published
Installer for SSR app
Downloads
3
Readme
Private NPX Module, SSR module
Private SSR
ReactJS: 18, Webpack: 5 Install project: yarn install, yarn add -D copy-webpack-plugin Start project: yarn ssr:start
Introduction
Common
It has a location file that can be used to define a language or country. It includes the alfa2 and alfa3 country code, the language abbreviation and the full country name.
Config
This folder includes the webpack config of the application. What you need to know:
- The path.js file: it stores the paths to the build, public src, package.json, etc. directories. Once you open it, you can read it in detail.
ENV
A place where global reusable variables that can be used for both development or production depending on the command you run.
Public
The place where you granite your fonts pictures etc. After you use the command to start SSR this data will be added to the build folder. The place where you granite your fonts pictures etc. After you use the command to start SSR this data will be added to the build folder. For static display they will be used from there.
Scripts
This is the directory that is responsible for running the webpack configuration and for running SSR.
Server
This is the SSR directory. For your development, you need to make modifications to config.ssr.js. It contains:
- backEndHealthCheck: responsible for whether you need to wait for the backend to be raised before running SSR. An example of the data to be transferred is given in the candy. We can use an additional callback if you want.
- seo: this object is used to set the default seo data or the data you can get from response.
- metaTags: this object is used to set the default meta data or the data you can get from a query.
- rewriteRules: .... robot.txt, default xml data from backend
- redirectData: this object is used to set the faulty language and redirect link.
- allowRoutes: specify in this object those pages that are used in your application (without specifying languages, just basic page designations).
- translations: an object with translations, you can see how it should look like in /src/store/translation/translation/translation.slice.js.
- checkConfig: ...
- routes: this is an array of paths that are in your application. You specify them in the src/routes folder. The example application shows how this is specified. src/routes/app.routes.js src/routes/app.routes.ssr.js
- storeConfig: here you must pass the APP and the store you created to redux in order to connect your application to the server and to ensure that the data is installed in the store.
- renderAppConfig:...
- ssrCacheConfig: is used to transfer the cache. You can leave it untouched