cosmos-explorer/preview
Asier Isayas 261289b031
Remove legacy backend references in tests and local dev (#1983)
* remove legacy backend references in tests and local dev

* fix unit tests

* fixed bulk delete

* fix tests

* fix cosmosclient

---------

Co-authored-by: Asier Isayas <aisayas@microsoft.com>
2024-09-30 14:34:37 -04:00
..
.azure Automated Preview URLs (#601) 2021-04-02 12:24:01 -05:00
config.json Enable Preview for Hosted Mode (#844) 2021-05-27 22:13:18 -05:00
index.js Remove legacy backend references in tests and local dev (#1983) 2024-09-30 14:34:37 -04:00
package-lock.json Pull request preview URLs (#625) 2021-04-12 15:10:31 -05:00
package.json Update subscription for preview PRs (#1265) 2022-05-04 20:11:13 -07:00
README.md Automated Preview URLs (#601) 2021-04-02 12:24:01 -05:00

Cosmos Explorer Preview

Cosmos Explorer Preview makes it possible to try a working version of any commit on master or in a PR. No need to run the app locally or deploy to staging.

Initial support is for Hosted (Connection string only) or the Azure Portal. Examples:

Connection string URLs: https://cosmos-explorer-preview.azurewebsites.net/commit/COMMIT_SHA/hostedExplorer.html Portal URLs: https://ms.portal.azure.com/?dataExplorerSource=https://cosmos-explorer-preview.azurewebsites.net/commit/COMMIT_SHA/explorer.html#home

In both cases replace COMMIT_SHA with the commit you want to view. It must have already completed its build on GitHub Actions.

Architechture

  • This folder contains a NodeJS app deployed to Azure App Service that powers preview URLs:
    • Paths starting with /commit/ are proxied to an Azure Storage account containing build artifacts
    • Paths starting with /proxy/ are proxied dynamically to Cosmos account endpoints. Required otherwise CORS would need to be configured for every account accessed.
    • Paths starting with /api/ are proxied to Portal APIs that do not support CORS.
  • On GitHub Actions build completion:
    • All files in dist are uploaded to an Azure Storage account namespaced by the SHA of the commit
    • /preview/config.json is uploaded to the same folder with preview specific configuration