Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

topcoder-platform/micro-frontends-profile-app

Repository files navigation

Topcoder Profile App

This is the Topcoder Profile micro application. This is to be loaded in Topcoder mfe-coresingle-spa application.

NOTE. This application have been configured to be run as child app of a single-spa application. So while this app can be deployed and run independently, we would need some framesingle-spa which would load it. While technically we can achieve running this app as standalone app it's strongly not recommended by the author of thesingle-spa approch, see thisGitHub Issue for details.

Requirements

  • node - v10.22.1
  • npm - v6.14.6

NPM Commands

CommandDescription
npm startRun server which serves production ready build fromdist folder
npm run devRun app in thedevelopment mode anddev config
npm run dev-httpsRun app in thedevelopment mode anddev config using HTTPS protocol
npm run localRun app in thedevelopment mode andlocal-dev config
npm run prodRun app in thedevelopment mode andprod config
npm run buildBuild app for production and puts files to thedist folder, default todevelopment mode andlocal-dev config
npm run analyzeAnalyze dependencies sizes and opens report in the browser
npm run lintCheck code for lint errors
npm run formatFormat code using prettier
npm run testRun unit tests
npm run watch-testsWatch for file changes and run unit tests on changes
npm run coverageGenerate test code coverage report

Local Deployment

Inside the project folder run:

  • nvm use 10.22.1; - to use npm version: 10.22.1
  • npm i - install dependencies
  • npm run local - run app indevelopment mode andlocal-dev config
  • As this app can be loaded only inside a frame single-spa, you have to run amfe-core frame app and configure it to use the URLhttp://localhost:8009/profile-app/topcoder-micro-frontends-profile-app.js.

Deployment to Production

  • npm i - install dependencies
  • APPMODE=production APPENV=prod npm run build - build code todist/ folder
  • Now you can hostdist/ folder using any static server. For example, you may run a simpleExpress server by runningnpm start.

Deploying to Heroku

Make sure you haveHeroky CLI installed and you have a Heroku account. And then inside the project folder run the next commands:

  • If there is not Git repository inited yet, create a repo and commit all the files:

    • git init
    • git add .
    • git commit -m'inital commit'
  • heroku apps:create - create Heroku app

  • git push heroku master - push changes to Heroku and trigger deploying

  • Now you have to configure frame app to use the URL provided by Heroku likehttps://<APP-NAME>.herokuapp.com/profile-app/topcoder-micro-frontends-profile-app.js to load this microapp.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp