UNPKG
@axolo/egg-cos
Version:
latest (0.0.7)
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Tencent Cloud COS plugin for Egg.js.
github.com/axolo/egg-cos
axolo/egg-cos
@axolo/egg-cos
/
app.js
15 lines
(11 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'
;
const
Cos
=
require
(
'./lib/cos'
);
const
createCos
= options => {
const
{
COS
} = options;
const
cos =
new
Cos
({ ...options }); cos.
COS
=
COS
;
return
cos; };
module
.
exports
=
app
=>
{ app.
addSingleton
(
'cos'
, createCos); };