会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
空船
博客园
首页
新随笔
联系
订阅
管理
1
2
下一页
2020年2月17日
process.env.NODE_ENV和env在webpack中的使用
摘要: process.env.NODE_ENV process对象是全局变量,它提供当前node.js的有关信息,以及控制当前node.js的有关进程。因为是全局变量,它对于node应用程序是始终可用的,无需require()。 NODE_ENV不是process.env对象上原有的属性,它是我们自己添加
阅读全文
posted @ 2020-02-17 17:23 空船
阅读(2006)
评论(0)
推荐(0)
2020年1月17日
redis 03. 连接koa-session和redis nodejs
摘要: 安装koa-session yarn add koa-session 配置koa-session redis const session = require('koa-session'); const Redis = require('ioredis'); const redis = new Red
阅读全文
posted @ 2020-01-17 11:37 空船
阅读(499)
评论(0)
推荐(0)
2020年1月15日
next.js 集成css antd
摘要: next使用 @zeit/next-css 支持import css 安装:npm install --save @zeit/next-css || yarn add @zeit/next-css配置: // next.config.js// next支持import css const withC
阅读全文
posted @ 2020-01-15 15:55 空船
阅读(1312)
评论(0)
推荐(0)
redis 02. 使用ioredis连接nodejs和redis
摘要: 一、安装 yarn add ioredis || cnpm i redis --save 二、使用 执行 node test.js // test.jsasync function test(){ const Redis=require('ioredis'); const redis = new R
阅读全文
posted @ 2020-01-15 15:30 空船
阅读(1926)
评论(0)
推荐(0)
redis 01. redis在mac系统上的安装与使用
摘要: 一、redis mac系统安装 1.下载解压安装。 首先进入redis官网直接下载。 解压后进入文件夹,执行 make 命令。 然后执行 sudo make install 命令。 安装成功。 2.使用homebrew安装。 执行 brew install redis 遇到问题先 brew upda
阅读全文
posted @ 2020-01-15 14:05 空船
阅读(438)
评论(0)
推荐(0)
2020年1月10日
OAuth02.接入github oauth app
摘要: 接入github OAuth时序图 github oauth api地址 https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/ 1. 使用client_id scope等获取code。 浏览器输入:
阅读全文
posted @ 2020-01-10 14:43 空船
阅读(591)
评论(0)
推荐(0)
2020年1月9日
OAuth01.注册gith oauth app
摘要:
阅读全文
posted @ 2020-01-09 13:52 空船
阅读(234)
评论(0)
推荐(0)
2020年1月8日
三、Redux DevTools结合Redux DevTools Extension调试redux
摘要: 安装chrome扩展 安装redux-devtools-extension yarn add redux-devtools-extension --dev store.js import { composeWithDevTools } from 'redux-devtools-extension';
阅读全文
posted @ 2020-01-08 05:16 空船
阅读(365)
评论(0)
推荐(0)
二、react中集成redux
摘要: 安装react-redux yarn add react-redux 引入Provider 传入store 类似context import {Provider} from 'react-redux' import store from '../store/store' render() { con
阅读全文
posted @ 2020-01-08 04:54 空船
阅读(437)
评论(0)
推荐(0)
一、redux基础使用
摘要: 安装redux redux-thunk yarn add redux redux-thunk 三个概念: store reducer action store createStore创建 getState()获取状态 dispatch(action)触发reducer更新 subscribe(()=
阅读全文
posted @ 2020-01-08 04:07 空船
阅读(188)
评论(0)
推荐(0)
1
2
下一页
公告