-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.html
executable file
·865 lines (740 loc) · 25.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Node.js 在广发证券:koa2 和 微服务实战新一代API Server</title>
<meta name="description" content="gf node.js practice">
<meta name="author" content="sivagao">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/serif.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<style type="text/css">
.reveal h1 {
font-size: 2.77em;
}
.gftech-opensources .current-fragment,
.apiserver-graphqls .current-fragment,
.microservice-requests .current-fragment,
.general-codereview-platos .current-fragment,
.koa-middleware-compose .current-fragment {
width: 80%;
position: absolute;
left: 10%;
top: 220px;
}
.apiserver-graphqls .current-fragment {
top: 140px;
}
.microservice-docker.fragment {
top: -200px;
width: 70%;
position: relative;
}
.microservice-requests .current-fragment {
top: 80px;
}
/*.koa-middleware-compose {
top: -60px;
}*/
.koa-middleware-compose img {
top: 0;
}
.end-join-frg1{
position: absolute;
top: 210px;
left: 12.5%;
width: 75%;
}
</style>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<a href="http://github.com/gaohailang/node-party-gf-security-practice" style="z-index: 101; position: absolute;"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- 序言 -->
<section>
<!-- 封面 -->
<section>
<h1>Node.js 在广发证券</h1>
<h3>koa2 和 微服务实战新一代API Server</h3>
<p>分享者: SivaGao / <a href="http://github.com/gaohailang">@gaohailang</a></p>
</section>
<!-- 个人介绍 -->
<section data-markdown>
## 个人介绍
- 豌豆荚 - WebApp
- 广发证券 - Hybrid App && Node.js 开发
- [我的博客](https://github.com/gaohailang/blog) (一些技术上的思考和分享)
![](./images/14598836453050.jpg)
</section>
<!-- Agenda -->
<section data-markdown>
## 分享大纲
* 我们是谁?
* 我们对 Node.js 的定位
* API Server 一览
* Koa2 和 Node.js
* 日常开发 与 Node.js
* 微服务 和 Node.js
</section>
</section>
<!-- 我们是谁? -->
<section>
<section>
<h1>
我们是谁?
</h1>
</section>
<section data-markdown>
## 广发 `FinTech` 态度
- 金融创新
- 技术前沿
</section>
<section>
<h2>向国际顶级投行看起</h2>
<img src="./images/14598836766862.jpg" alt="">
</section>
<section>
<h2>Bleeding Edge,技术追求!</h2>
<img src="./images/14598836936018.jpg" alt="">
</section>
<section data-markdown>
## 这样选型的原因
- 吸引爱玩技术的你们
- 解决问题弯道超车
- 形成学习型组织
![](./images/14598837513672.jpg)
</section>
</section>
<!-- 我们对 Node.js 的定位 -->
<section>
<section>
<h1>Node.js 的定位</h1>
</section>
<section>
<img src="./images/14598838237638.jpg" alt="">
</section>
<section>
<img src="./images/14598838731799.jpg" alt="">
</section>
</section>
<!-- API Server 和 Node.js -->
<section>
<section>
<h1>API Server 和 Node.js</h1>
</section>
<section data-markdown>
## 不同时代的Server
- Backend 渲染页面 + 部分 Ajax
- 前后分离 RESTful(或 db access)
- RESTful extend
- API Server 新方向
- graphql & falcor
- meteor
</section>
<section data-markdown>
## RESTful Extend
- Optional-Field
- Filter & Sort
- Pagination
- Bulk Inserts
- Embedded & Sub Resource
```js
/people?where={"lastname": "Doe"}
/people?sort=city,-lastname
/people?sort=[("lastname", -1)] // mongodb style
/people?projection={"lastname": 1, "born": 1}
/comment/?embedded={"author": 0}
curl -d '[{"firstname": "barack", "lastname": "obama"}, {"firstname": "mitt", "lastname": "romney"}]' -H 'Content-Type: application/json' http://eve-demo.herokuapp.com/people
```
</section>
<section data-markdown>
## API Server 新方向
- GraphQL & Relay @ Facebook
- [GraphQL:数据定义和逻辑前移]()
- [Relay:客户端状态和缓存]()
- [graphql-server 开源实现](https://github.com/RisingStack/graphql-server)
- Falcor @ Netflix
- 类似效果,容易实现
- Meteor
- send data over the wire
</section>
<section>
<img src="./images/14598832396579.jpg" width="200px;">
<table>
<tr class="apiserver-graphqls">
<td><img src="./images/14598830486065.jpg" class="fragment" /></td>
<td><img src="./images/14598832283354.jpg" class="fragment" /></td>
</tr>
</table>
</section>
<!-- <section>
<img src="./images/14598834022920.jpg" alt="">
</section> -->
<section data-markdown>
## 另类的Meteor
- LiveQuery, DDP, pub/sub, remote method
![](./images/14599935528704.jpg)
</section>
</section>
<!-- Koa2 与 Node.js -->
<section>
<section>
<h1>Koa2 与 Node.js</h1>
</section>
<section data-markdown>
## 关于 Koa2
- [它是什么](https://github.com/koajs/koa/issues/533)
- [也来八卦:Express 的奇葩发展史](https://github.com/gaohailang/blog/issues/7)
- 何时发布
- [ecmascript async-await stage 3](https://tc39.github.io/ecmascript-asyncawait/)
- 等V8引擎(Chromium)开发完2a
- 等2a被集成到 Node.js
- 不要害怕,很多人通过babel用在线上
- [Microsoft ChakraCore 已经实现](https://github.com/Microsoft/ChakraCore/tree/master/test/es7),Cheers!
- 哪些改动?
- 中间件 & generator, yield
</section>
<!-- 为什么选择 Koa2 -->
<section data-markdown>
## 为什么选择 Koa2
- 1 语义合适的异步
- 2 干干净净的错误处理
- 3 优雅回形针的中间件
- response-time demo
</section>
<section data-markdown>
## 语义合适的异步
```js
const fs = require('fs-promise');
async function readDirContent(doc) {
let paths = await fs.readdir('docs');
let files = await paths.map(function(path){
return fs.readFile('docs/' + path, 'utf8');
});
this.type = 'markdown';
this.body = files.join('');
};
/*async function fetchSepcialShops (ctx, next){
let spNumTypeMap = ['manager', 'developer', 'userFav'];
ctx.checkQuery('tradeId', 'Invalid trade id').notEmpty();
ctx.checkQuery('shopId', 'Invalid shop id').notEmpty();
if(!isReqRight(ctx)) return;
let {tradeId, shopId} = ctx.request.query
, userId = ctx.request.get('userId'), reses;
let [r1, r2, r3] = await Promise.all([
rp({url: storeSpShopList, qs: {type: 1, userId: tradeId}}),
rp({url: storeSpShopList, qs: {type: 2, userId: tradeId}}),
userId ? rp({url: userFavShopList, headers: {userId}, qs: {
shopId, from: 1, size: 5
}}) : {}
]);
ctx.body = _.zipObject(spNumTypeMap, [r1.data, r2.data, _.map(r3.data, 'shop')]);
}*/
```
</section>
<section data-markdown>
## 干干净净的错误处理
```js
module.exports = async function(ctx, next) {
try {
await next();
} catch (err) {
if (err == null) {
err = new Error('Null or undefined error');
}
ctx.status = err.status || 500;
ctx.body = {
success: false,
message: err.stack
};
ctx.app.emit('error', err, this);
}
};
// 用于关闭前的一些处理如保存数据,记录错误,发送邮件等等
process.on('uncaught', ()={});
```
</section>
<section data-markdown>
## 优雅回形针的中间件
```js
function responseTime() {
return async(ctx, next) => {
let start = new Date;
await next();
var delta = new Date - start;
ctx.set('X-Response-Time', delta + 'ms');
}
}
```
</section>
<!-- 我们的koa中间件 -->
<section data-markdown>
## 我们的koa中间件
- koa-compose
- 常见的middleware
- koa-adapter
- 文件即路由
- koa-validator & joi
</section>
<section>
<h2>中间件回形针的运行</h2>
<table>
<tr>
<td><img src="./images/koa-middleware.gif"></td>
<td style="vertical-align: middle;">
<img src="./images/14598798348020.jpg">
</td>
</tr>
</table>
</section>
<section data-markdown>
## 回形针的实现 koa compose
```js
function compose (middleware) {
return function (context, next) {
// last called middleware #
let index = -1
return dispatch(0)
function dispatch (i) {
if (i <= index) return Promise.reject(new Error('next() called multiple times'))
index = i
const fn = middleware[i] || next
if (!fn) return Promise.resolve()
try {
return Promise.resolve(fn(context, function next () {
return dispatch(i + 1)
}))
} catch (err) {
return Promise.reject(err)
}
}
}
}
```
</section>
<section data-markdown>
## 常见的中间件
![](./images/14598798901987.jpg)
</section>
<section data-markdown>
## 兼容中间件 - [koa adapter](https://github.com/th507/koa-adapter)
- 1.x中间件的引入
- 把 es6 的 generator/yield
- 变成 es7 的 async/await 写法
```js
// Koa 1.0 middleware
app.use(function*(next) {
const start = Date.now();
yield next;
const ms = Date.now() - start;
console.log(`${this.method} ${this.url} - ${ms}ms`);
});
// koa-res-time@1 only support koa@1
const adapt = require("koa-adapter");
const resTime = require("koa-res-time");
// use legacy middlewares with adapt(...)
app.use(adapt(resTime));
```
</section>
<section data-markdown>
## 接口验证和数据验证
- [koa-validate: validate/format req params](https://github.com/RocksonZeta/koa-validate)
- [joi: object schema validation](https://github.com/hapijs/joi)
```js
ctx.checkQuery('query', 'Invalid query').notEmpty();
ctx.checkQuery('type', 'Invalid type')
.isIn(baseSearchTypes.concat(['all']));
let joiUserSchema = Joi.object({
name: Joi.object({
first: Joi.string().required(),
last: Joi.string().required()
}),
email: Joi.string().email().required(),
bestFriend: Joi.string().meta({ type: 'ObjectId', ref: 'User' }),
metaInfo: Joi.any()
});
```
</section>
</section>
<!-- 日常开发与 Node.js -->
<section>
<section>
<h1>日常开发与 Node.js</h1>
</section>
<section data-markdown>
## 日常注意点
- ES6 化
- 构建过程
- 在线上运行
- 2016年新注意点
- Web 上下游
</section>
<section data-markdown>
## ES6,马上开始
- 迁移 legacy 代码
```js
// before
var page = req.query.page,
, size = req.query.size;
// after
let {pgae, size} = req.query;
rp({
uri, params: {page, size}
});
```
- Babel 集成
```json
{
"presets": ["es2015-node5"],
"plugins": [
"transform-async-to-generator",
"syntax-async-functions"
]
}
```
</section>
<!-- npm scripts 构建过程 -->
<section data-markdown>
## npm scripts 构建过程
更详细参见我们的[脚手架文章](https://github.com/gf-rd/blog/issues/20)
- 及时更新依赖
- 文件变化监控
- 入库前检查
- 代码质量检查
- 代码坏味道
</section>
<section data-markdown>
## 及时更新依赖 - [npm-check](https://github.com/dylang/npm-check)
![](./images/14598767264510.jpg)
</section>
<section data-markdown>
## 文件变化监控 - nodemon
```json
{
"main": "index.js",
"scripts": {
"dev": "nodemon --exec babel-node -- $npm_package_main"
}
}
```
![](./images/14598770272183.jpg)
</section>
<section data-markdown>
## 入库前检查
[husky](https://npmjs.org/package/husky) 可以修改你的git命令,提供hook点在commit/push/merge 前执行检查
- npm run precommit : npm test
- npm run prepush : npm-run-all lint test test:deps
- npm run inspect : jsinspect
![](./images/14599285872337.jpg)
</section>
<section data-markdown>
## 哪些部分要测试覆盖
npm run coverage : lab -r lcov
- 那些经常要被修改的 change a lot
- 那些有很高复杂度的 risky
- 那些重要功能/常被查看的 more traffic
</section>
</section>
<section>
<h2 id="-">代码质量检查</h2>
<ul>
<li><a href="https://github.com/es-analysis/plato">plato</a><ul>
<li>JavaScript 源代码可视化, 静态分析和复杂度管理</li>
</ul>
</li>
<li><a href="https://github.com/danielstjules/jsinspect">jsinspect</a><ul>
<li>找出粘贴复制和代码结构类似的代码</li>
</ul>
</li>
</ul>
<table>
<tr class="general-codereview-platos">
<td><img class="fragment" src="./images/14598775638257.jpg" alt=""></td>
<td><img class="fragment" src="./images/14599298644351.jpg" alt=""></td>
</tr>
</table>
</section>
<section data-markdown>
![](./images/94419d84gw1f2jqooa7i9j213y10an94.jpg)
</section>
<section data-markdown>
## [针针见血:怎么消除JavaScript中的代码坏味道](https://github.com/gaohailang/blog/issues/5)
> 如临时定时器,双向数据绑定的坑,复杂的分支语句,重复赋值等,对它们进行分析如现场还原,糟糕代码回顾,问题诊断和识别(通过ESlint或其他工具),代码重构方案,给出了怎么写好代码的一手经验~
</section>
<section data-markdown>
![](./images/54aeed78b5e8033c6b14.png)
</section>
<section data-markdown>
## 在线上运行
- 性能调优
- 上线准备
- 安全施工
</section>
<section data-markdown>
## StrongLoop 性能优化系列
- [heap profiling](https://strongloop.com/strongblog/node-js-performance-heap-profiling-tip/)
- [memory leak diagnosis](https://strongloop.com/strongblog/node-js-performance-tip-of-the-week-memory-leak-diagnosis/)
- [CPU profiling](https://strongloop.com/strongblog/node-js-performance-tip-cpu-profiler/)
- [scaling proxies clusters](https://strongloop.com/strongblog/node-js-performance-scaling-proxies-clusters/)
- [event loop monitoring](https://strongloop.com/strongblog/node-js-performance-event-loop-monitoring/)
- [garbage collection](https://strongloop.com/strongblog/node-js-performance-garbage-collection/)
</section>
<section data-markdown>
![](./images/14598782052144.jpg)
</section>
<section data-markdown>
![](./images/14598781886376.jpg)
</section>
<section data-markdown>
## 上线前准备
- Gzip压缩中间件/Nginx开启
- 静态文件中间件/Nginx加入
- 避免尽量少的复杂同步代码(Event Loop 监控)
- 打好全量的log信息(通过环境变量和进程信号调整)
- 合理的处理异常
</section>
<section data-markdown>
## 安全施工
- 不要使用过期老旧的版本框架
- 快点用上 https
- Helmet 中间件
- 安全使用Cookie & Session
- 确保其他组件依赖是安全的
- 其他一些基础的:[security-checklist](https://blog.risingstack.com/node-js-security-checklist)
</section>
<section data-markdown>
## [2016年新项目哪些注意点?](https://github.com/gf-rd/blog/issues/29)
- 异步函数支持回调惯例和Promise新写法
- 智能的 .npmrc 和正确的版本管理做法
- Web 应用开发的十二条军规
- 始终用 npm init 开始新项目
- 使用标准的 JavaScript 代码风格
- 使用 eslint 工具,同时配合 eslint-plugin-standard 插件
</section>
<section data-markdown>
## 应用服务器上下游
- 关于openresty & haproxy & varnish
- 关于 mongodb, redis
- 关于log,监控和指标计算
- 关于 kafka 等
- 关于扩容,Docker,kubernetes
</section>
</section>
<!-- 微服务和Node.js -->
<section>
<section>
<h1>微服务和Node.js</h1>
</section>
<section data-markdown>
## 微服务
[Node 接入层 微服务架构](https://github.com/gf-rd/blog/issues/10)
- 特点
- 架构
- 要素
</section>
<section>
<img src="./images/14598813280552.jpg" alt="">
</section>
<section>
<img src="./images/14598813696713.jpg" alt="">
</section>
<section>
<img src="./images/14598813893269.jpg" alt="">
</section>
<section data-markdown>
## 微服务集成开发
- docker 部署
- 无状态(随时被动态扩缩容掉
- request监控(链路追踪
- 配置加载管理(环境变量
</section>
<section>
<h2>Docker 部署</h2>
<a href="https://github.com/gaohailang/blog/issues/13">
容器,Dokcer,虚拟化 - 写给开发者的入门指南
</a>
<img src="./images/14598810519526.jpg" class="fragment microservice-docker">
</section>
<section data-markdown>
## Docker 部署 More
```json
{
"rsync:gftest": "rsync --cvs-exclude -cauvz -e \"ssh -A gf@<relay-ip> ssh\" .es5 ubuntu@<dest-ip>:/opt/gf/gfwealth-composite/",
"docker:prebuild": "rsync -avz --exclude .es5 --exclude .idea . ./.es5 && babel . --out-dir ./.es5 --ignore ./.es5,./node_modules",
"docker:build": "cd .. && docker build -t <private-docker-host>/gfwealth-composite:koa-2016-03-17 .",
"docker:run": "sudo docker run -d --name gfwealth-composite -p 8000:9321 -v /opt/gf/gfwealth-composite/logs:/opt/gf/gfwealth-composite/logs -v /etc/localtime:/etc/localtime:ro --env-file=\"config/env/product\" docker.gf.com.cn/gfwealth-composite:koa-2016-03-17",
"docker:restart": "npm run docker:run && npm run docker:rm"
"docker:rm": "sudo docker rm -f gfwealth-composite",
"docker:push": "docker login docker.gf.com.cn && docker push <private-docker-host>/gfwealth-composite:koa-2016-03-17"
}
```
</section>
<section data-markdown>
## 请求的监控和debug
```js
require('request-debug')(rp, function(type, data, r) {
// put your request or response handling logic here
// Todo: request-post data lost? response json.stringify broken?
if(type === 'request') {
var {debugId, uri, method, body} = data;
var userId = data.headers.userId;
var more = body ? '' : ('-'+body) + userId ? '' : ('userId:'+userId);
debug(`${debugId}-${method}-${uri}` + more);
}
if(type === 'response') {
var {debugId, statusCode, body} = data;
debug(`${debugId}-response-${statusCode}-`+JSON.stringify(body).slice(0, 155));
}
});
```
</section>
<section>
<h2>请求的链路监控</h2>
<table>
<tr class="microservice-requests"><td>
<img class="fragment" src="./images/14598809054912.jpg"></td>
<td><img class="fragment" src="./images/14598809442901.jpg"></td>
</tr>
</table>
</section>
<section data-markdown>
## 配置加载和环境变量
关于配置我们集成了confit和shorthandle(来自paypal)
- 各种 handler
- 基于不同环境实现差异化配置
- 根据env变量自动加载
```js
// envfile
GFWC_storeExShopList=http://shopdev.gf.com.cn/api/store/shop/excellentshop/{id}/{page}/{size}
GFWC_storeSpShopList=http://shopdev.gf.com.cn/api/store/shop/special
GFWC_userFavShopList=http://shopdev.gf.com.cn/api/store/auth/favorites/shop/inorg
// 配置:
{
"env": "development",
"api": {
"articleSearch": "env:GFWC_articleSearch",
"shopSearch": "env:GFWC_shopSearch",
"stockSearch": "env:GFWC_stockSearch",
"portfolioSearch": "env:GFWC_portfolioSearch"
}
}
```
</section>
</section>
<!-- 我们和开源 -->
<section>
<section>
<h1>我们和开源</h1>
</section>
<section>
<h2 id="-">开源的参与和贡献</h2>
<ul>
<li>ES6</li>
<li>Angular2</li>
<li>更多见Blog,我们的技术分享</li>
</ul>
<hr>
<table>
<thead>
<tr>
<th style="text-align:center">QCon分享</th>
<th style="text-align:center">翻译</th>
<th style="text-align:center">技术博客</th>
</tr>
</thead>
<tbody class="gftech-opensources">
<tr>
<td style="text-align:center"><img src="./images/14598823363661.jpg" class="fragment gftech-opensource-1"></td>
<td style="text-align:center"><img src="./images/IMG_9916.jpg" class="fragment gftech-opensource-2"></td>
<td style="text-align:center"><img src="./images/14598823953064.jpg" class="fragment gftech-opensource-3"></td>
</tr>
</tbody>
</table>
</section>
</section>
<!-- 结束end -->
<section>
<section>
<h2>回顾一下</h2>
<ul>
<li class="fragment visible highlight-green">
<ul>
<li>我们是谁?</li>
<li>我们和开源</li>
</ul>
</li>
<li class="fragment visible highlight-red">
<ul>
<li>对 Node.js 的定位</li>
<li>API Server 一览</li>
</ul>
</li>
<li class="fragment visible highlight-blue">
<ul>
<li>Koa2 和 Node.js</li>
<li>日常开发 与 Node.js</li>
<li>微服务 和 Node.js</li>
</ul>
</li>
</ul>
</section>
<section>
<h2>谢谢大家!</h2>
<p>微信:ghlndsl,邮箱:gaohailang@gf.com.cn</p>
<img src="./images/14598847325506.jpg">
<img src="./images/14598902035581.jpg" class="fragment end-join-frg1">
</section>
<section data-markdown>
## 引用和链接
- [广发IT招聘](http://it.gf.com.cn)
- [广发RD Github Organization](https://github.com/gf-rd)
- [广发技术博客](https://github.com/gf-rd/blog)
- [16年,新 Node 项目注意点](https://github.com/gf-rd/blog/issues/29)
- [Node 构建推荐做法](https://github.com/gf-rd/blog/issues/20)
- [Node 接入层 微服务架构](https://github.com/gf-rd/blog/issues/10)
- [Node.js 在广发证券:koa2 和 微服务实战新一代API Server](https://github.com/gaohailang/node-party-gf-security-practice)
</section>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>