0.1.57 • Published 4 years ago

yinxing v0.1.57

Weekly downloads
262
License
-
Repository
github
Last release
4 years ago

银杏

travis_Build Status

Build Status

Actions Status

https://www.npmjs.com/package/yinxing

# 本地模拟云端环境

    cnpm i -g cos-nodejs-sdk-v5
    cnpm i -g qcloudapi-sdk
    cnpm i -g tencentcloud-sdk-nodejs
    cnpm i -g base64-js
    cnpm i -g buffer
    cnpm i -g crypto-browserify
    cnpm i -g ieee754
    cnpm i -g imagemagick
    cnpm i -g isarray
    cnpm i -g jmespath
    cnpm i -g lodash
    cnpm i -g punycode
    #cnpm i -g puppeteer
    cnpm i -g querystring
    cnpm i -g request
    cnpm i -g sax
    cnpm i -g url
    cnpm i -g uuid
    cnpm i -g xml2js
    cnpm i -g xmlbuilder


    export SecretId=****
    export SecretKey=****
    export Region=****
    export Bucket=****
    export Prefix=****
    export COS_HOST=****
    export maxFileSize=****
    export CosBucketName=****
    export CosObjectName=****
    export CosBucketRegion=****
    export ZipFile=****
    export CodeSource=****
    export DemoId=****
    export TempCosObjectName=****
    export GitUrl="https://github.com/xxx/xxx"
    export GitRepository=****
    export GitUserName=****
    export GitPassword=****
    export GitPasswordSecret=****
    export GitBranch=****
    export GitDirectory=****
    export GitCommitId=****
    export GitUserNameSecret=****

    export sms_test_phone=""
    export sms_AppID=""
    export sms_AppKey=""
    export sms_Sign=""
    export sms_templateId=""
    export sms_content="{1}为您的登录验证码,请于{2}分钟内填写。如非本人操作,请忽略本短信。" #

    export TOKEN_LIFE="86400"
    export TOKEN_AUD="aaaa"
    export TOKEN_SUB="cccc"
    export TOKEN_ALG="HS256"
    export TOKEN_TYP="JWT"

    npm install --save yinxing 
const {
    fp,
    q,
    cache,
    db,
    cos,
    sms,
    router,
 //   middleware,
 //   action,
    token,
    //...
}=require("yinxing")

scf

https://cloud.tencent.com/document/product/583/11060

Node.js 8.9 云端自带库

{
"dependencies":
    {
        "cos-nodejs-sdk-v5": "2.5.7",
        "base64-js": "1.2.1",
        "buffer": "5.0.7",
        "crypto-browserify": "3.11.1",
        "ieee754": "1.1.8",
        "imagemagick": "0.1.3",
        "isarray": "2.0.2",
        "jmespath": "0.15.0",
        "lodash": "4.17.4",
        "npm": "5.6.0",
        "punycode": "2.1.0",
        "puppeteer": "1.14.0",
        "qcloudapi-sdk": "0.1.5",
        "querystring": "0.2.0",
        "request": "2.87.0",
        "sax": "1.2.4",
        "tencentcloud-sdk-nodejs": "3.0.52",
        "url": "0.11.0",
        "uuid": "3.1.0",
        "xml2js": "0.4.17",
        "xmlbuilder": "9.0.1"
    }
}

https://cloud.tencent.com/document/product/583

SCF CLI

install

  pip3 install scf  
  scf --version

init

    scf init
    scf init --runtime python2.7 --name testproject --output-dir /Users/xxx/code/scf/
    scf init --runtime python2.7 --name hello 
    scf init --runtime nodejs6.10 --name hello 
    scf init --runtime nodejs8.9 --name hello 
    scf init --runtime python3.6 --name hello 
    scf init --runtime php5 --name hello 
    scf init --runtime php7 --name hello 
    scf init --runtime go1 --name hello 
    scf init --runtime nodejs 8.9 --name hello  --location http://..  --output-dir ./hello

test

    scf local generate-event cos post
    scf local generate-event cos put
    scf local generate-event cos delete
    scf local generate-event timer timeup
    scf local generate-event apigateway proxy
    scf local generate-event apigateway proxy > event.json

    scf native invoke --template template.yaml --event event.json
    scf native generate-event cos post| scf native invoke --template template.yaml
    scf local  invoke --template template.yaml --event event.json
    scf local generate-event cos post | scf local invoke --template template.yaml
    scf local generate-event cos post | scf local invoke -t template.yaml testfunction

deploy

   scf deploy
   scf deploy --cos-bucket temp-code-1253970226
   scf deploy -t deploy.yaml -f -c temp-code-1253970226 -n test-func -ns ccc -r ap-hongkong --skip-event
0.1.57

4 years ago

0.1.56

4 years ago

0.1.55

4 years ago

0.1.54

4 years ago

0.1.53

4 years ago

0.1.52

4 years ago

0.1.51

4 years ago

0.1.50

4 years ago

0.1.49

4 years ago

0.1.47

4 years ago

0.1.48

4 years ago

0.1.46

4 years ago

0.1.45

4 years ago

0.1.44

4 years ago

0.1.42

4 years ago

0.1.43

4 years ago

0.1.41

4 years ago

0.1.40

4 years ago

0.1.38

4 years ago

0.1.39

4 years ago

0.1.31

4 years ago

0.1.32

4 years ago

0.1.33

4 years ago

0.1.35

4 years ago

0.1.36

4 years ago

0.1.37

4 years ago

0.1.30

4 years ago

0.1.29

4 years ago

0.1.28

4 years ago

0.1.27

4 years ago

0.1.26

4 years ago

0.1.25

4 years ago

0.1.24

4 years ago

0.1.21

4 years ago

0.1.22

4 years ago

0.1.23

4 years ago

0.1.20

4 years ago

0.1.18

4 years ago

0.1.19

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.12

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago