首页 >

node.js入门实例helloworld详解【node.js】

web前端|js教程node.js入门实例helloworld详解【node.js】
node.js,入门,helloworld
web前端-js教程
p2p平台英文源码,vscode智能提示c,ubuntu老电脑,tomcat设置静态资源,c#创建sqlite数据库,鱼缸里出现一条爬虫怎么回事,php 打印菱形,seo的前端知识大全,蓝帜地板网站,英文建站模板lzw
将下面的代码保存为:server.js存到E盘下面的node目录中。
源码资源分享,ubuntu是否联网,tomcat定义默认首页,python爬虫配对,li php,青岛seo关键词优化分析lzw
var http = require('http');function myNode(request, response){  response.writeHead(200, {'Content-type':'text/plain'});  response.write('hello world'); //hello world  response.end();}http.createServer(myNode).listen(2222); //监听2222端口console.log('Server has started'); //在控制台提示服务启动
然后在windows命令行输入node e:/node/server.js
全屏公司网站源码,Ubuntu系统怎么优化,tomcat7有什么用,r语言爬虫登录,表单验证的类型和方法php,盖州seo推广lzw
提示服务启动(Server has started),然后在浏览器中输入http://localhost:2222/,即可以看到下图的效果。

执行成功后的效果


node.js入门实例helloworld详解【node.js】
  • 用PHP扩展做一个HelloWorld!
  • 用PHP扩展做一个HelloWorld! | 用PHP扩展做一个HelloWorld! ...

    node.js入门实例helloworld详解【node.js】
  • 微信开发学习日记(6):weiphp框架
  • 微信开发学习日记(6):weiphp框架 | 微信开发学习日记(6):weiphp框架 ...

    node.js入门实例helloworld详解【node.js】
  • AngularJS之HelloWorld实例
  • AngularJS之HelloWorld实例 | AngularJS之HelloWorld实例 ...