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

proxy-polaris-main-test

v1.0.14

Published

代理主项目资源,本地开发不需要启动main

Downloads

42

Readme

代理服务

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

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

主项目代理包npx一键运行(两种方式,一种直接命令,一种写启动脚本,执行脚本,以及脚本的查看等)

1.package.json 配置bin启动命令

'''"bin": {

"proxy": "./index.js"

},'''

2.在子项目中引用

npx [email protected](可以针对不同的环境配置,一键启动对应版本的包)

3.启动你本地需要开发的子项目;http:localhost:9526 进入工作台测试环境,点击对应的子项目菜单即可开始开发

4.开发结束后,关闭对9526端口的监听

--第一种方法,mac 直接输入 sudo lsof -i :端口号,查看你改端口的情况,sudo kill PID(PID是查看端口号中返回待关闭的进程id)

--第二种方法,mac 创建一个脚本文件,输入端口号结束进程;

sudo touch close_port.sh

sudo vim close_port.sh

文件内容(按i进去复制,:wq保存)

#!/bin/bash

关闭以指定端口号监听的进程

port=$1

if [[ -z $port ]] ; then echo "Usage: sudo ./close_port.sh " exit 1 fi

pid=$(sudo lsof -i :$port -t) if [[ -z $pid ]] ; then echo "Port $port is not in use." exit 0 fi

echo "Killing process $pid ..." sudo kill $pid

添加执行权限 chmod +x close_port.sh

执行命令 sudo ./close_port.sh 9526