- 博客(10)
- 问答 (2)
- 收藏
- 关注
原创 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 1900
原创 zeit/micro Error -- Cannot find module '../lib/help'
When I use the zeit/micro, I get the error:node: 8.6.0Mac / Ubuntu 16.04Reinstall the micro-dev, I get the error Resolving by remove the .bin/micro-dev, and reinstall the package, it’s working!
2017-09-30 14:20:46 530
原创 zeit/micro connect with Mongo by Mongoose
Micro-Mongoose-exampleMicro + Mongoose + Mongoinstall packages$ npm install micro micro-dev microrouter mongoose --saveUsing Mongoose to verify the data, and save to the MongoDB.package.json{ "name"
2017-09-27 10:44:53 682
原创 RabbitMQ error - rabbitmqctl: command not found
$ rabbitmqctl status-bash: rabbitmqctl: command not foundexport PATH=/usr/local/sbin:$PATHtest with$ rabbitmqctl statushttps://www.rabbitmq.com/man/rabbitmqctl.1.man.html#change_password
2017-09-13 17:21:57 5333 1
原创 Homebrew: Could not symlink, /usr/local/* is not writable
When I used the Homebrew to install RabbitMQ,get the errors ❌:The `brew link` step did not complete successfullyThe formula built, but is not symlinked into /usr/localCould not symlink ./usr/local/o
2017-09-13 15:14:48 3549
原创 Mongoose Warning `open()` is deprecated, `openUri()` instead
nodejs 使用mongoose,程序如下:const mongoose = require('mongoose');const url = `mongodb://192.168.1.198:27017/mean`mongoose.connect(url) // default port 27017错误如下:DeprecationWarning: `open()` is deprecated
2017-09-09 11:42:41 1051
原创 ES6 操作数组的并集/交集/差集
使用ES6 操作数组let a = new Set([1, 2, 3]);let b = new Set([3, 5, 2]); // 并集let unionSet = new Set([...a, ...b]);//[1,2,3,5]// 交集let intersectionSet = new Set([...a].filter(x => b.has(x)));// [2,3]//
2017-09-08 09:55:57 19718
原创 Remote mongo - refused
MongoDB was installed on Ubuntu 16.04.When i connect the mongo on my pc, I get the error:Failed to connect to 192.168.1.118:27017, reason: errno:61 Connection refusedchange /etc/mongod.conffilebind_ip
2017-09-05 17:10:23 374
原创 Ubuntu mate 17.04 - Installation error 5
安装Ubuntu mate 17.04 时,遇到[ Err no 5] input/ out put 应该这样安装使用 Try Ubuntu 模式运行 ubuntu 系统, 然后点击桌面上的 安装Ubuntu 图标,安装Ubuntu 就可以。此解决方案来自: (https://ubuntu-mate.community/t/installation-error-5/6393/3) zambrotta
2017-09-05 16:22:05 1312
原创 Ansible Failed - apt lock
EnvironmentOn Ubuntu 16.04 / Ubuntu 14.04 Ansible 2.3.2.0updateApt.yml- name: APT Update hosts: webservers become: True tasks: - name: Update apt apt: update_cache: yeserror
2017-09-04 18:36:05 1493
空空如也
google chrome 浏览器事件处理
2015-03-03
Backbone 和 Leaflet 的插件sidebar-v2
2015-02-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人