npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

polaris-main-proxy-test

v1.0.2

Published

## 工作台不需求启用主应用也可以开发的方案

Downloads

13

Readme

代理服务

工作台不需求启用主应用也可以开发的方案

index.js 解决了,不启动polaris-main,也可以运行子应用的方案 思路就是:访问9526端口的时候启动子应用,访问9526端口的默认访问测试环境,如果是访问子项目则通过代理到本地子项目服务

工作台测试环境解决困扰多年,无法进行容器化的解决方案

原因

  1. 问题:使用容器比如docker-k8s 部署的时候,一刷新页面就无法正常访问子应用。原因是访问index.html的时候访问了子应用的index.html。 原因:那么需要每次访问index.html都要不经过代理,访问的都是主项目的index.html。
#nginx.conf

# 一直困惑运维,没有将工作台升级到容器化,导致每次回滚都需要重新构建的原因
# 用来判断是否是html或xhtml,以判断是否刷新页面请求index.html,是解决访问子项目,qiankun刷新页面后白屏的关键
map $http_accept $is_html_or_xhtml {
    default                     0;
    ~*text/html                 1;
    ~*application/xhtml+xml     1;
}
# polaris-main.conf

# 如果是访问子项目
location /sub-service/ {
    # 默认代理地址, 比如fetch请求,qiankun使用通过fetch来请求子项目的资源的
    set $backend http://192.168.0.101:7780;
    # 如果是请求html或者xhtml,则使用直接访问测试环境
    set $is_html_or_xhtml 0;
    if ($is_html_or_xhtml) {
        set $backend http://polaris-test.int.zhumanggroup.com/;
    } 
    proxy_pass $backend;
}