Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duiba-tiny-image-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
duiba-tiny-image-node
Commits
6a13f1d9
Commit
6a13f1d9
authored
Nov 06, 2021
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改4
parent
95110541
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
index.js
dist/index.js
+3
-3
index.js.map
dist/index.js.map
+1
-1
index.ts
src/index.ts
+3
-3
No files found.
dist/index.js
View file @
6a13f1d9
...
...
@@ -9,7 +9,7 @@ const eureka_1 = require("./eureka");
const
logger_1
=
require
(
"./logger"
);
const
config
=
require
(
"config"
);
const
api_1
=
require
(
"./api"
);
const
ali_oss_duiba_1
=
require
(
"ali-oss-duiba"
);
//import {setup as setupOSS} from 'ali-oss-duiba'
let
eureka
;
const
server
=
restify
.
createServer
({
name
:
'tiny-image'
,
...
...
@@ -39,12 +39,12 @@ async function start() {
await
(
0
,
remote_configs_1
.
prepare
)();
const
ossConfigs
=
(
0
,
remote_configs_1
.
getConfigs
)({
name
:
`apollo.oss.duiba.accessId`
,
alias
:
'accessId'
},
{
name
:
`apollo.oss.duiba.accessKey`
,
alias
:
'accessKey'
});
logger_1
.
default
.
info
(
'got oss configs:'
,
ossConfigs
);
(
0
,
ali_oss_duiba_1
.
setup
)
({
/*setupOSS
({
accessKeyId: ossConfigs.accessId,
accessKeySecret: ossConfigs.accessKey,
bucket: 'duiba',
region: 'oss-cn-hangzhou',
})
;
})
*/
const
port
=
config
.
get
(
'PORT'
);
server
.
listen
(
port
,
async
function
()
{
if
(
process
.
env
.
NODE_ENV
)
{
...
...
dist/index.js.map
View file @
6a13f1d9
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,qDAA6E;AAE7E,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AAClC,qCAAwC;AACxC,qCAA6B;AAC7B,iCAAgC;AAChC,+BAA4B;AAC5B,iDAA+C;AAE/C,IAAI,MAAM,CAAA;AAEV,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;CAChB,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,CAAA;AAE1C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;AAC3D,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AACzC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;AACxC,MAAM,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;IAClC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAa,CAAC,EAAE;QACjD,gBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KACpB;IACD,OAAO,IAAI,EAAE,CAAA;AACd,CAAC,CAAC,CAAA;AAEF,IAAA,aAAQ,EAAC,MAAM,CAAC,CAAA;AAEhB,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;IACvC,gBAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC,CA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AAC,CAAA;IACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAChB,CAAC,CAAC,CAAA"}
\ No newline at end of file
src/index.ts
View file @
6a13f1d9
...
...
@@ -8,7 +8,7 @@ import {getEurekaClient} from "./eureka"
import
logger
from
"./logger"
import
*
as
config
from
"config"
import
applyApi
from
"./api"
import
{
setup
as
setupOSS
}
from
'ali-oss-duiba'
//
import {setup as setupOSS} from 'ali-oss-duiba'
let
eureka
...
...
@@ -51,12 +51,12 @@ async function start() {
)
logger
.
info
(
'got oss configs:'
,
ossConfigs
)
setupOSS
({
/*
setupOSS({
accessKeyId: ossConfigs.accessId,
accessKeySecret: ossConfigs.accessKey,
bucket: 'duiba',
region: 'oss-cn-hangzhou',
})
})
*/
const
port
=
config
.
get
(
'PORT'
)
server
.
listen
(
port
,
async
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment