
node-js
小鸟啄米
我是一只小小小小鸟
展开
-
Install nodejs and remove nodejs
Setup with Ubuntu:curl -sL https://deb.nodesource.com/setup | sudo bash -Then install with Ubuntu:sudo apt-get install -y nodejsSetup with Debian (as root):apt-get install curlcurl -sL https://deb.nod转载 2015-05-12 17:36:14 · 1200 阅读 · 0 评论 -
nodejs 读写文件
nodejs 读写文件的方法:所谓写文件就是将数据写入到空白的文件之中。操作步骤:安装 nodejs 安装方法见:http://blog.youkuaiyun.com/hobbithero/article/details/45672489使用nodejs的文件系统模块完成读写操作:var fs = require('fs');var file_path = 'txt/writeFileSync.txt原创 2016-05-23 13:28:37 · 665 阅读 · 0 评论 -
npm, node版本更新
npmjs.com相关内容: 查看npm版本:npm -v更新npm版本:npm install npm -gnpm install npm@latest -g //安装最新版本https://docs.npmjs.com/getting-started/installing-node原创 2016-07-15 11:57:43 · 3835 阅读 · 0 评论 -
Update Nodejs on Ubuntu
Update node to Latest Versionsudo npm cache clean -fsudo npm install -g nsudo n stable // or sudo n4.0.0sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node原创 2016-09-21 17:17:32 · 677 阅读 · 0 评论 -
nodejs 中如何使用ES6语法
nodejs中,现在还不兼容es6语法,使用babel进行编译,方法如下:安装如下包:$ npm install babel-core babel-polyfill babel-preset-es2015 --save在创建文件 index.js,内容如下:require('babel-core/register');require('babel-polyfill');require('原创 2017-09-30 17:29:21 · 1931 阅读 · 0 评论