- 博客(16)
- 收藏
- 关注
转载 课堂
(二)varfunction变量提升let没有变量提升let会锁死{}// let a = 2; // { // console.log(a); // 暂存死区被这里面的let锁死不会向上找,除非把这里的去掉// let a = 1; // }const 不能改变赋值的空间 const a = []; a.push(1)...
2018-12-01 09:29:00
83
转载 读《图解HTTP》
什么是TCP/IP协议两个实体之间通信要遵循一定的协议,比如邮件,文件,网络等等,这些总和就是TCP/IP协议URI和URL的区别URI包括URL,URI可以是file:// ,等,URL是网络请求地址HTTP状态码之3开头301永久重定向302临时重定向303类似302但限制使用GET方法304客户端附带条件请求,服务器找到资源但不满足条件HTTPS...
2017-12-06 22:28:00
100
转载 socket.io
npm install socket.io在node后台服务器文件中融合进socket.iodemo示例:let express =require('express');let http=require('http')let app=express();let server=http.createServer(app)let io=require('soc...
2017-11-29 14:32:00
75
转载 mongodb
启动步骤下载mongodb服务器端新建一个文件夹用作数据库进入mongodb安装的bin目录下cmd执行mongod --dbpath=数据库目录如出现waiting for connections for 27017表示成功了下载mongodb客户端进入安装目录 cmd执行mongo --host= 服务器的ip地址 省略则表示本机可打开Mongo...
2017-11-29 14:08:00
93
转载 js基础
字符串的方法 数组的方法数组的变异(括号里的会改变原数组)(pop push unshift shift splice reverse sort) indexof lastIndexof concat slice.forEach(function(item,index){不支持return})for in可以遍历对象for of不能遍历...
2017-11-24 11:07:00
94
转载 react路由
路由1安装react-router-domimport {HashRouter或者 BrowserRouter as Router,Route,Link,Redirect,withRouter,} from 'react-router-dom'<Router> <Link to="/"或{...
2017-11-19 15:04:00
65
转载 git指令
## 管理代码的版本(代码) (分布式git) (集中式 svn)- 记住是谁提交的东西- 可以保存每个阶段的内容(备份功能)- 可以实现历史穿越- github 开源 多端共享- 团队协作> linus开发的linux系统,开发git可以实现自动合并代码,比较diff## 安装git- (最新版的如果提交过一次后会记住用户名和密码)- 下载地址https://git-scm.co...
2017-11-18 21:07:00
60
转载 redux中间件
import {createStore,applyMiddleware} from 'redux'import promise from 'redux-promise'import thunk from 'redux-thunk'import logger from 'redux-logger'在createStore(reducer,applyMiddlew...
2017-11-15 20:19:00
71
转载 从redux到react-redux
原生手写redux实现原理import React,{Component} from 'react'import ReactDOM from 'react-dom'let initState=0;let createStore=function(reducer){ let state; let listeners=[]; ...
2017-11-11 14:08:00
76
转载 如何搭建react项目
手工搭建npm init -y 初始化package.json配置webpack.config.js需要安装的{ "name": "byme", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo ...
2017-11-04 15:29:00
46
转载 react基础
const element = ( <h1 className="greeting"> Hello, world! </h1>);element经过babel转义成浏览器可识别的语法const element = React.createElement('h1',{className: 'greeting'...
2017-10-31 12:56:00
64
转载 node框架
expressnpm i express -Slet express =require('express');let app=express();app.get(路径,function(req,res){ express框架新增的方法 res.send(任意类型) res.sendFile()//(文件绝对路径) 或 (相对路径,{...
2017-10-28 18:06:00
63
转载 跨域解决方案
cors服务器允许跨域请求:设置响应头Access-Control-Allow-Origin:'允许跨域的url'//如果客户端要向服务器发送cookie的话,绝不对写*res.header('Access-Control-Allow-Origin', "http://localhost:8080");res.header('Access-Control-Allo...
2017-10-24 15:45:00
51
转载 webpack.config.js和package.json
webpack是基于node的,所以写法采用commonjslet path=require('path');let HtmlWebpackPlugin=require('html-webpack-plugin');module.exports={ entry:''相对路径 入口文件 output:{打包后文件 filename:文件...
2017-10-24 14:46:00
223
转载 vue全家桶
标签篇<template></template>无意义标签<component :is="组件名"></component>该组件替代指令篇值是引号,引号里面是变量:v-model 仅用于input textareas select表单元素,忽略表单元素的value,checked,selec...
2017-10-24 14:45:00
58
转载 node原生
js代码node运行js文件,会将该js文件闭包,并且有5个默认参数:module,exports,require,__dirname,__filename在文件开头会自动加上module.exports=exports={};在文件结尾会自动加上 return module.exports;Buffernew Buffer(内容)有copy方...
2017-10-24 14:43:00
67
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人