Skip to content

ahmadkani/webComponentLauncher

Repository files navigation

Step 1: Set up the CORS Proxy

To enable communication with external APIs and repositories, you need to set up a CORS proxy: put the corsProxy.js in another folder and install its dependencies with npm.

npm install @isomorphic-git/cors-proxy
npm install express
node corsProxy.js

Step 2: Configure Component Attributes

Open the settings file in the root of your repository. Define your component's attributes using the following format:

  [attributes]
    map-title = نقشه ایران

Step 3: Modify the Index File

Customize the index.html file to suit your requirements.

<body>
  <component-launcher
      updateInterval="20000" // checks your web component's repository with this interval
      repoUrl="https://github.com/ahmadkani/wc" // your repository address
      username="" 
      password="x-oauth-basic" //username and password if your repository is private
      attributes='{"map-data":"..."}'
      fileName="iran-map.js"> // your web component's filename in the root of repo
  </component-launcher>
</body>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages