It is some times convenient, even necessary, to make use of a module that you are working on before it has been published to the node package manager (npm). The npm link command makes this simple. For example: upper/index.js: module.exports = functio
by zhangxinxu from http://www.zhangxinxu.com/wordpress/?p=6154 本文可全文转载,但需得到原作者书面许可,同时保留原作者和出处,摘要引流则随意. 最近,把团队内经常使用的一个基于Node.js制作的小工具给做成了可视化操作的桌面软件,使用的是electron,这里简单分享一下使用electron的一些经验和心得. 一.如何使用electron把基本的开发环境给跑起来? 我是这么处理的,electron官方提供了一个名为“electron
最近在使用npm过程中,发现全局安装总会遇到permission相关的错误,所以总是要在前面加sudo,还得不停输入密码. 懒惰使我进步,随手google了一下相关问题的解决方案,发现npm在官方文档中早有明示How to Prevent Permissions Errors.据其描述,根本原因其实是Node.js安装包将程序安装在了一个只有local permissions的地址上(写入是需要管理员权限的).而其提供了两种修复的方式,其中的推荐方式既是本文要说的nvm的方式. nvm的优势 n
这篇文章编译整理自Stack Overflow的一个如何开始学习Node.js的Wiki帖,这份资源列表在SO上面浏览接近60万次,数千个收藏和顶.特意整理发布到这里,其中添加了部分中文参考资料. 学习指南和教程 NodeSchool.io 交互式课程 Node的艺术 (Node简介) Hello World Hello World Web Server Node.js 指南 使用Node.js, express和MongoDB创建一个博客 Node+MongoDB 100分钟建站攻略 Proj
Asynchronous code & Synchronous code As we have seen in an earlier post (here), how node does things Asynchronously. For a “Traditional programmer”, this can be a tough pill to swallow. So lets take a look at how things can be done async. Tradition p
https://github.com/ramr/nodejs-custom-version-openshift 由于是线上服务器,一步一步来: 先把上面的工程拉下来,覆盖到初始化的工程里,提交,让服务器端装起来. # Uncomment one of the version lines to select the node version to use. # The last "non-blank" version line is the one picked up by the co