Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

URL Design #3

@digitalsadhu

Description

@digitalsadhu

In the prototypes made so far, a URL structure has been loosely determined with some but not a lot of thought. The following lays out the URLs that are currently in use in the prototype.

1. A global published module's immutable URLs

http://:assetServerUrl:port/:org/pkg/:pkgName/:version/index.js
http://:assetServerUrl:port/:org/pkg/:pkgName/:version/index.js.map

Where:

  • :org is the name of your organisation
  • :pkgName is the name of the package on npm
  • :version is the version of the package on npm

Example:

http://localhost:4001/finn/pkg/react/16.8.6/index.js
http://localhost:4001/finn/pkg/react/16.8.6/index.js.map

2. A module alias' modifiable URL

http://:assetServerUrl:port/:org/alias/:pkgName/:alias/index.js
http://:assetServerUrl:port/:org/alias/:pkgName/:alias/index.js.map

Where:

  • :org is the name of your organisation
  • :pkgName is the name of the package on npm
  • :alias is the alias that you have assigned to the package eg. ^16

Example:

http://localhost:4001/finn/alias/react/^16/index.js
http://localhost:4001/finn/alias/react/^16/index.js.map

3. A modifiable import map file

http://:assetServerUrl:port/:org/map/js

Where:

  • :org is the name of your organisation

Example:

http://localhost:4001/finn/map/js

4. An app's published assets

http://:assetServerUrl:port/:org/bundle/:appName/:version/index.js
http://:assetServerUrl:port>/:org/bundle/:appName/:version/index.js.map

Where:

  • :org is the name of your organisation
  • :appName is the name of your app
  • :version is the version of your assets being published

Example:

http://:assetServerUrl:port/finn/bundle/my-cool-app/1.0.0/index.js
http://:assetServerUrl:port/finn/bundle/my-cool-app/1.0.0/index.js.map
http://:assetServerUrl:port/finn/bundle/my-cool-app/1.0.0/fallback.js // ie11
http://:assetServerUrl:port/finn/bundle/my-cool-app/1.0.0/fallback.js.map

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions