<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nodejs &#8211; moneyslow.com</title>
	<atom:link href="https://moneyslow.com/tag/nodejs/feed" rel="self" type="application/rss+xml" />
	<link>https://moneyslow.com</link>
	<description>making money with technology</description>
	<lastBuildDate>Fri, 06 Dec 2024 14:58:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
	<item>
		<title>tmp目录下puppeteer_dev_chrome_profile 占用磁盘空间问题</title>
		<link>https://moneyslow.com/tmp%e7%9b%ae%e5%bd%95%e4%b8%8bpuppeteer_dev_chrome_profile-%e5%8d%a0%e7%94%a8%e7%a3%81%e7%9b%98%e7%a9%ba%e9%97%b4%e9%97%ae%e9%a2%98.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 06 Dec 2024 02:23:59 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[puppet]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19872</guid>

					<description><![CDATA[有安装截图工具puppeteer 的，看看：/tmp目录下 ，直接干到100%磁盘 puppeteer_dev_profile是透过puppeteer操作Headless Chrome时会在 /tmp 自动产生的文件夹。倘若程序没有正确关闭chrome进程﹐/tmp/puppeteer_dev_profile-* 将无法自动回收并残留在操作系统上，佔用不必要的硬盘空间。 Github上已有人提出这个问题 ，而其解决方法 是程序在关闭headless chrome后接着移除相关文件夹。办法不错，前提是完成任务后需要主动关闭chrome，而且在移除puppeteer_dev_profile之前要祈求程序不要崩溃。 可惜我这边的是长时间运行的web service，chrome不会关 ，使用pm2管理程序重启，想简单一点移除多余的文件夹就可以了 (每个puppeteer_dev_profile佔 1 ~ 2 GB 不等，机器真的吃不消~)所以就组装一下以下shell command︰ 合共5个步骤用pipe串接︰ 首先ls -t /tmp按最近修改时间 (modification time) 逐一列出/tmp下的档案名字； grep puppeteer_dev_profile筛选出名字包含puppeteer_dev_profile的行； tail -n 2截取由第2行 (包括第2行) 至最后一行 (包括最后一行)，因為第1个puppeteer_dev_profile文件通常正在被程序使用中； awk '{print "/tmp/"$1}'把每行文件名字加上前缀/tmp/，变成full path； 最后透过xargs -l1把每行full path接在rm -rf后执行，逐一永久移除/tmp/puppeteer_dev_profile-* 文件。 把这个放进crontab，视情况我每天执行一次，注意权限是否足够，每个指令建议改用full path，例如ls改为/usr/bin/ls。]]></description>
		
		
		
			</item>
		<item>
		<title>Nginx配置Node.js反向代理(避免Recv failure: Connection reset by peer错误)</title>
		<link>https://moneyslow.com/nginx%e9%85%8d%e7%bd%aenode-js%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e9%81%bf%e5%85%8drecv-failure-connection-reset-by-peer%e9%94%99%e8%af%af.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Tue, 19 Nov 2024 05:39:18 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nodejs]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19701</guid>

					<description><![CDATA[nodejs 出现Recv failure: Connection reset by peer 错误的，一般是由于网络问题，本身http就是不安全的，通常我们在js服务启动后，都要加个nginx代理，避免不必要的网络错误，后期是非常省事的。下面是nginx的简单配置： 证书配置： 如果服务多，需要加负载均衡的配置： 加权重的配置： 默认情况下，请求会按顺序逐一分配到不同的 Node.js 服务，如果某一个服务挂了则会被剔除。上面这个配置则会让两台服务器的3001端口接受更多的请求。 其它的策略，ip_hash：每个请求按访问ip的hash结果分配，这样在用户 IP 不变的情况下，将固定访问一个后端服务器fair：按后端服务器的响应时间来分配请求，响应时间短的优先分配url_hash 按访问 url 的 hash 结果来分配请求，使每个 url 定向到同一个后端服务器策略使用方法：]]></description>
		
		
		
			</item>
		<item>
		<title>node.js的npm命令大全npm和cnpm（China NPM）以及yarn</title>
		<link>https://moneyslow.com/node-js%e7%9a%84npm%e5%91%bd%e4%bb%a4%e5%a4%a7%e5%85%a8.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Sat, 09 Nov 2024 03:56:37 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nodejs]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19637</guid>

					<description><![CDATA[npm：npm全称Node Package Manager，是 Node.js 平台的默认软件包管理器，用于安装、发布和管理 Node.js 应用程序和软件包。它是一个命令行工具，允许开发人员在他们的项目中轻松地管理依赖项、安装软件包、更新软件包版本以及执行其他与软件包相关的任务。npm 是 nodejs 中的一部分，通常与 nodejs 一起安装和更新。当你安装了 nodejs，npm 也随之安装。 cnpm：cnpm（China Node Package Manager）是一个为中国大陆用户定制的 npm（Node Package Manager）镜像，由阿里巴巴的淘宝团队开发和维护。由于 npm 的原始服务器位于国外，对于中国大陆的用户来说，下载和安装 Node.js 包时可能会遇到速度较慢或连接不稳定的问题。为了解决这个问题，cnpm 镜像被创建出来，以提高下载速度和稳定性。 提示1：cnpm大多数情况可以不要，直接换npm的源为国内镜像即可。因为它们都起到了加速npm包下载的作用。不过，如果你需要使用cnpm提供的一些额外功能或服务，如私有npm包管理等，那么仍然需要使用cnpm。 提示2：如果你之前的npm/cnpm使用的是旧域名，https://npm.taobao.org 或 https://registry.npm.taobao.org 这两个域名已经弃用，建议尽快更新你的 npm / cnpm 配置。你可以使用以下命令来设置新的淘宝 NPM 镜像源 如果你使用的是 cnpm，可以这样设置 完成设置后，你可以通过运行 npm get registry 或 cnpm get registry 来验证新的镜像源是否已正确设置。 常用的npm和cnpm镜像源地址官方源（npm registry）：https://registry.npmjs.org/淘宝NPM镜像源：https://registry.npmmirror.com/cnpm镜像源：http://r.cnpmjs.org/阿里云NPM镜像源：https://npm.aliyun.com/腾讯云NPM镜像源：https://mirrors.cloud.tencent.com/npm/华为云NPM镜像源：https://mirrors.huaweicloud.com/repository/npm/网易NPM镜像源：https://mirrors.163.com/npm/中国科学技术大学开源镜像站：http://mirrors.ustc.edu.cn/npm/清华大学开源镜像站：https://mirrors.tuna.tsinghua.edu.cn/npm/ yarn（Yarn:Yet Another Resource Negotiator，是一个快速、可靠、安全的依赖管理工具，一款新的JavaScript包管理工具。）Yarn是由Facebook、Google、Exponent和Tilde联合推出了一个新的JS包管理工具 ，如官方文档中写的，"快速、可靠、安全的依赖管理工具。"，Yarn是为了弥补npm的一些缺陷而出现的。 它旨在解决npm存在的一些性能和安全性问题，并提供更好的用户体验。 [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>错误nodejs puppet google-chrome tinyproxy net::ERR_CONNECTION_RESET连接失败</title>
		<link>https://moneyslow.com/%e9%94%99%e8%af%afnodejs-puppet-google-chrome-tinyproxy-neterr_connection_reset%e8%bf%9e%e6%8e%a5%e5%a4%b1%e8%b4%a5.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 23 Aug 2024 01:37:01 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[tinyproxy]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=18912</guid>

					<description><![CDATA[net::ERR_CONNECTION_RESET连接失败解决办法]]></description>
		
		
		
			</item>
		<item>
		<title>ubuntu22.04下Puppeteer+Nodejs截图服务安装</title>
		<link>https://moneyslow.com/ubuntu22-04%e4%b8%8bpuppeteernodejs%e6%88%aa%e5%9b%be%e6%9c%8d%e5%8a%a1%e5%ae%89%e8%a3%85.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 23 Feb 2024 07:59:00 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nodejs]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=17674</guid>

					<description><![CDATA[nodejs截图服务的安装方法]]></description>
		
		
		
			</item>
		<item>
		<title>使用PM2进程管理器，让nodejs程序开机自动启动</title>
		<link>https://moneyslow.com/%e4%bd%bf%e7%94%a8pm2%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86%e5%99%a8%ef%bc%8c%e8%ae%a9nodejs%e7%a8%8b%e5%ba%8f%e5%bc%80%e6%9c%ba%e8%87%aa%e5%8a%a8%e5%90%af%e5%8a%a8.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 21 Sep 2023 01:51:04 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[nodejs]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=16521</guid>

					<description><![CDATA[nodejs自动启动]]></description>
		
		
		
			</item>
		<item>
		<title>Puppeteer+Nodejs截图乱码中文变方块,在Ubuntu 22.04上安装中文字体</title>
		<link>https://moneyslow.com/puppeteernodejs%e6%88%aa%e5%9b%be%e4%b9%b1%e7%a0%81%e4%b8%ad%e6%96%87%e5%8f%98%e6%96%b9%e5%9d%97%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85%e4%b8%ad%e6%96%87%e5%ad%97%e4%bd%93.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 02:09:50 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nodejs]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=16517</guid>

					<description><![CDATA[ubuntu22.04安装中文字体]]></description>
		
		
		
			</item>
	</channel>
</rss>
