Code Monkey home page Code Monkey logo

single-spa-demo-root-config's Introduction

single-spa demo - Root Config

Overview

This repo is used in conjunction with three other repos listed below. Together they make up an application composed of microfrontends. Each app can be updated and deployed independently of the others.

Demo

You can find the demo here: https://thawkin3-single-spa-demo.herokuapp.com/page1

How It Works

This project uses single-spa to architect an app composed of micrfrontends. In the root config, the three microfrontend apps (nav, page 1, and page 2) are registered with singe-spa. The main index.ejs file contains an import map, which references where to find the compiled JavaScript bundle for each microfrontend. SystemJS is the module loader which then loads the bundles when needed.

Each repo is set up with Travis CI for running jobs as part of a continuous integration pipeline. When new code is pushed to the master branch for any of the repos, the new code is compiled and then uploaded to AWS S3, which serves as a CDN. The CI job also updates the import map file to reference the new bundle for the updated project.

NPM Scripts

  • build: Creates a production build
  • lint: Lints the code using ESLint
  • prettier: Formats the code using Prettier
  • start:dev: Starts a webpack dev server for running the app in development mode
  • start" Starts an express server for running the app in production mode
  • test: Runs unit tests using Jest

single-spa-demo-root-config's People

Contributors

thawkin3 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.