摘要:
引用nodejs内置http模块,创建http server。 // 直接引用内置http模块,直接写模块名即可 const http = require('http') // 使用ES6规范,使用箭头函数 const server = http.createServer((req,res) =>{ 阅读全文
摘要:
引用nodejs内置http模块,创建http server。 // 直接引用内置http模块,直接写模块名即可 const http = require('http') // 使用ES6规范,使用箭头函数 const server = http.createServer((req,res) =>{ 阅读全文
摘要:
ES全称为ECMAScript 定义了语法,写javascript和nodejs都必须遵守。 变量定义,循环、判断、函数。 原型和原型链、作用域和闭包、异步。 不能操作DOM,不能监听click事件,不能发送ajax请求。 不能处理http请求,不能操作文件。 如果只有ES,做不了完整的项目。 Ja 阅读全文
|