Single-spa application example which imports registered applications from NPM packages and manages authentication features as login.
The login validation is harcoded in code and the credentials are:
User | Password |
---|---|
admin | 123456 |
If you prefer run this application in localhost you must follow next steps:
npm install
npm run serve
Finally you only have to open http://localhost:8080 in a browser to see the app running
This application is a root-application that inits a single-spa application that integrates several registered applications:
- single-spa-login
- single-spa-layout
- single-spa-home-app-new
- single-spa-angular
- single-spa-vue
- single-spa-react
This application is displayed by default as there is no logged in user. A login form is printed and the credentials can be set for perform the login and access to the private views.
This application contains header, navbar and footer sections, navigation between registered applications and /login redirection if logout link is clicked or token is removed from sessionStorage.
This application is developed with Angular JS and is mounted when home icon in navbar is clicked. In that case the url will be / and all Angular JS routes will be managed by angular-ui-router. By the moment this application has only one default routed view.
This application is developed with Angular v8 and is mounted when Angular navbar item is clicked. In that case the url will be /angular and all Angular routes will be managed by angular router.
This application is developed with Vue and is mounted when Vue navbar item is clicked. In that case the url will be /vue and all Vue routes will be managed by vue-router.
This application is developed with React and is mounted when React navbar item is clicked. In that case the url will be /react and all React routes will be managed by react-router-dom.