NodeJs Introduction
来源:互联网 发布:securecrt 8.1.4 mac 编辑:程序博客网 时间:2024/06/10 00:58
NodeJs是运行在服务器端的Javascript!随着Web开发的发展,原来在客户端运行的Javascript能够运行在服务端,并且更重要的是,Javascript能够做服务端做的事情,在REST API 流行的今天,NodeJS的优势就更加明显了,今天学习了第一个HelloWorld!
1.下载
https://nodejs.org/download/
2.安装
常规安装方式,不再赘述。
3.配置环境变量
D:\Program Files\nodejs 添加到PATH中
4.Demo
var http = require('http');http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello World\n');}).listen(8124);console.log('Server running at http://127.0.0.1:8124/');5.效果
Microsoft Windows [Version 6.3.9600](c) 2013 Microsoft Corporation. All rights reserved.C:\Users\justin_000>cd D:\NodeJsAppC:\Users\justin_000>D:D:\NodeJsApp>node NodeApp1.jsServer running at http://127.0.0.1:8124/
总结:
这样一个简单的服务监听就实现了!
0 0
- NodeJs Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- introduction
- Introduction
- Introduction
- introduction
- Introduction
- Introduction
- Introduction
- iOS使用NSMutableAttributedString 实现富文本(不同颜色字体、下划线等)
- 程序启动动画
- Aop(编程方式)
- 今天是个好日
- Android多线程编程之五:限制模式(StrictMode)的使用
- NodeJs Introduction
- Navicat for MySQL 设置定时任务(事件)
- Activity、Service&Handler
- C#实体模型增删改查
- 第十一周项目四--类族的设计(子任务)
- 类成员变量中存在引用,const,和指针类型时需要注意的事项
- uva 1594
- 2-11-3 点类派生直线类
- Android实战技巧之三十三:android.hardware.camera2使用指南