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

clipboard-socket

v1.0.2

Published

剪贴板同步服务

Downloads

3

Readme

ClipboardSync / 剪贴板同步

桌面端 | 安卓端 | 服务端

一款简单的剪贴板同步工具

功能

  • 基于 socket.io 的服务端,完成 socket 数据转发
  • 提供了 npm 包 clipboard-socket

公开的 socket 服务地址:

  • http://sock.mysocket.online:3000

使用方式

使用 NPX 启动

使用 npx 直接启动

## 将 80 替换成你需要的端口
npx clipboard-socket 80

clone 代码并运行


# clone
git clone https://github.com/clipboard-sync/socket-server.git
# cd dir
cd socket-server
# install dependencies
npm i 

## 1. use pm2
npm run start
## 2. use node
node index.js

作为 JS 模块使用

npm install:

npm i clipboard-socket

use in code:

const Socket = require("clipboard-socket");
let s = new Socket(3000);
console.log(s.io); // s.io 是 socket.io-server 实例

模块功能

  • 使用 socket.io-client 建立连接后
  • io.emit("join", CHANNEL) 加入频道
  • io.emit("data", DATA ) 向频道广播

私有部署

Docker

请先确保您已经安装了Docker

如果您的机器还没有安装Docker,请自行于Google百度搜索Docker并寻找适合您的安装教程。

如遇构建镜像缓慢,多半是因为Docker主机DockerHub之间连接缓慢,请解决网络问题,或寻找与您Docker主机网络友好的DockerHubMirror

# Build Docker Image
docker build -t socket-server:latest https://github.com/clipboard-sync/socket-server.git#master:Docker
# 如在中国大陆且网络不畅,请使用以下命令构建镜像
docker build -f DockerfileCN -t socket-server:latest https://ghproxy.com/https://github.com/clipboard-sync/socket-server.git#master:Docker
# Run it
docker run -d -p 3000:3000 --name socket-server socket-server:latest

随后将Client端的服务器地址修改为http://运行Docker的主机地址:3000即可。

License

MIT