文章分类 - Node.js
摘要:目录结构 styles.css body { background: #0d1521; font-family: tahoma; color: #989898; } #todo-table { position: relative; width: 95%; background: #090d13;
阅读全文
摘要:基本介绍 var express = require('express'); var app = express(); app.use(function(req,res,next) { console.log('first middle ware'); next(); console.log('fi
阅读全文
摘要:基本命令 npm install express --save 安装express npm init 初始化 npm install -g nodemon 自动监控代码变化 nodemon 运行会找server.js文件 npm install--save body-parser 解析body np
阅读全文
摘要:模块 var adder = function(a,b) { console.log(`the sum of a and b is ${a+b}`) } module.exports = adder; var add = require("./counter") add(1,2); 命令行运行 no
阅读全文
摘要:基本演示 1. 在windows下安装node.js,安装成功后输入 node --version 可以查看脚本信息 2. 创建服务端js文件 var http = require('http'); var server = http.createServer(function(req, res){
阅读全文

浙公网安备 33010602011771号