Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.17 KB

README.md

File metadata and controls

30 lines (20 loc) · 1.17 KB

Spartacus + xdn-router configuration

This is an experimental configuration of Spartacus and xdn-router. More about the two here:

Usage

  1. Build Spartacus SSR $ yarn build:ssr
  2. Start the server $ yarn serve:ssr
  3. Start the xdn router server $ node server.js
  4. Test - open http://localhost:3000

What's going on

XDN is a CDN as code provided by MOOVWEB. It let's you control caching mechanism programmatically. To use it we set up an Express server that renders Spartacus app (listening on localhost:3002). Then we set up the xdn-router in front of it (listening on localhost:3000), so that it calls Spartacus and is able to cache it. We can configure the caching mechanism in router.js.

What's next

This is a PoC (Proof of Concept) that it is possible to deploy Spartacus or plain Angular apps to MOOVWEB XDN. However, it requires some extra development to be production ready.

Acknowledgements

Thanks to Mark Brocato for helping out with this setup.