Nemo

Nemo 关注TA

路漫漫其修远兮,吾将上下而求索。

Nemo

Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  •  普罗旺斯
  • 负责帅就完事了
  • 写了1,496,113字

标签 > 标签文章:#nodejs# (共有19文章)

  • npm 国内镜像设定

    镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):1.通过config命令npmconfigsetregistryhttps://registry.npm.taobao.orgnpminfounderscore(如果上面配置正确这个命令会有字符串response)2.命令行指定npm--registryhttps://registry.npm.taob......

     1,279    0    2017-04-13 22:04

  • nodejs版本快速升至最新版

    只需要两个步骤即可升级:1、首先安装n模块别看它名字很短,用途却很大,可以用短小精悍来形容。n模块是专门用来管理nodejs版本的。这里需要全局安装:sudonpminstall-gn2、升级node.js到最新稳定版nstable等待完成即可。

     1,839    0    2017-03-21 10:06

  • 【NodeJs】Http:简化版客户端http.get

    varhttp=require('http');http.get({       host:'localhost',       path:'/user?name=Nemo',       ......

     4,728    0    2016-08-01 22:20

  • 【NodeJs】Http:client

    varhttp=require('http');varquerystring=require('querystring');varcontents={       'name':'Nemo',       'age':'23',  &nbs......

     3,081    0    2016-08-01 22:11

  • 【NodeJs】Http:post

    varhttp=require('http');varqueryStr=require('querystring');varutil=require('util');http.createServer(function(req,res){       varpost='';    &nbs......

     3,438    0    2016-08-01 21:50

  • 【NodeJs】Http:get

     varhttp=require('http');varurls=require('url');varutil=require('util');http.createServer(function(req,res){       res.writeHead(200,{'Content-Type':'text/plain......

     3,296    0    2016-08-01 21:49

  • 【NodeJs】Http:原生实现

    varhttp=require('http');varserver=newhttp.Server();server.on('request',function(){       res.writeHead(200,{'Content-Type':'text/html'});    &nbs......

     1,098    0    2016-08-01 21:49

  • 【NodeJs】Http: 基本服务

    varhttp=require('http');varserver=http.createServer(function(req,res){       console.log(req.url);       res.writeHead(200,{'Conte......

     3,414    0    2016-08-01 21:48

  • [NodeJs]HTTP

    varoptions={    hostname:'www.imooc.com',    port:80,    path:'/course/docomment',    method:'POST',   &n......

     5,356    0    2016-07-05 15:56

  • [Nodejs]第一个爬虫

    varhttp=require('http');varcheerio=require('cheerio');varurl='http://www.link-nemo.com/Cynthia/index.do';functionfilterChapters(html){       var$=cheerio.load(html);......

     2,875    2    2016-07-05 13:57

  • [NodeJS] FS模块

    1、FS模块跟其他模块不同,所有的操作都提供了异步和同步两种方式。2、fs.readFile(filename,[ecoding],[callback(err,data)])异步式读取文件,文件不会被阻塞在读取文件的地方,而会继续往下执行。文件操作完成后,需要通过回调函数指定相应的操作。如果发生异常,会通过回调函数中的err参数通知。文件的内容会通过回调函数传递。=================......

     5,262    0    2016-06-20 22:24

  • 【NodeJs]events.EventEmitter事件

    events模块只提供了一个对象:events.EventEmitter.EventEmitter的核心就是事件发射与事件监听器功能的封装。//为指定事件注册监听器,接受一个字符串event和一个回调函数listenerEventEmitter.on(event,listener)//发射event事件,传递若干可选参数到事件监听器的参数表EventEmitter.emit(event,[arg1......

     1,520    0    2016-06-17 00:25

  • 【NodeJS]Util.inspect实体属性输出

    varutil=require('util');functionPerson(){   this.name='Nemo';   this.toString=function(){      returnthis.name;   }}varobj=ne......

     1,930    0    2016-06-17 00:12

  • [NodeJS]Util.inherits,原型继承

    //引入util模块varutil=require('util');//定义函数BasefunctionBase(){   //定义全局变量name和year   this.name='Nemo';   this.year=2016;   //定义了一个私有的sayHello方法......

     2,418    0    2016-06-17 00:06

  • [NodeJS]学习资源

    1.学习路线图http://blog.fens.me/nodejs-roadmap/2.视频http://www.icoolxue.com/album/show/89http://www.imooc.com/learn/3483.在线文档http://www.runoob.com/nodejs/nodejs-tutorial.htmlhttps://nodejs.org/api/

     3,071    0    2016-06-14 23:49

  • [NodeJS]读取文件

       varfs=require('fs');    fs.readFile('file.txt','utf-8',function(err,data){        if(err){     &n......

     4,283    0    2016-06-13 21:16

  • [NodeJS]npm 的使用

    安装$npminstallexpress-gnpmWARNcheckPermissionsMissingwriteaccessto/usr/local/lib/usr/local/lib└─┬express@4.13.4├─┬accepts@1.2.13│├─┬mime-types@2.1.11││└──mime-db@1.23.0│└──negotiator@0.5.3├──array-flat......

     3,725    0    2016-06-13 21:07

  • [NodeJS]第一个服务器端程序

    $vimfirstServer.js输入:varhttp=require('http');http.createServer(function(request,response){    response.writeHead(200,{'Content-Type':'text/plain'});    response......

     3,742    0    2016-06-13 20:59

  • [NodeJS]Ubuntu下部署nodejs环境

    有两种方式:1、$sudogitclonehttps://github.com/nodejs/node.git$sudochmod-R755node$cdnode$sudo./configure$sudomake$sudomakeinstall即可完成。输入:$node-v查看Nodejs版本。2、直接使用apt-get方式安装:$sudoapt-getinstallnodejs$sudoapt-......

     3,552    0    2016-06-13 20:57

  • 1