美文网首页
Nodejs学习笔记-安装配置及Helloworld

Nodejs学习笔记-安装配置及Helloworld

作者: 莫名FCJ | 来源:发表于2017-10-23 15:48 被阅读9次

    Linux下安装node.js

    yum install -y nodejs
    node -v
    v6.11.3
    npm -v
    3.10.10

    hellowolrd

    vim helloworld.js
    node helloworld.js
    hello, world

    var http = require('http')
    http.createServer(function (request, response) {
        console.log('访问');
        response.write('hello, world');
        response.end();
    }).listen(8000);
    console.log('Server running at http://127.0.0.1:8000/');
    

    参考文档

    Vim配置Node.js开发工具
    http://www.cnblogs.com/zhanghaiyublog/p/3649959.html
    node.js教程1_安装和hello
    http://edu.51cto.com//center/course/lesson/index?id=124524

    相关文章

      网友评论

          本文标题:Nodejs学习笔记-安装配置及Helloworld

          本文链接:https://www.haomeiwen.com/subject/aosauxtx.html