Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tapas Authorize

Qiniu

const koa = require('koa');
const mount = require('koa-mount');
const authorize = require('tapas-authorize');

// Set your secret keys at first
authorize.qiniu.setKeys('ACCESS_KEY', 'SECRET_KEY');

// Build middleware with bucket only
const mw = authorize.qiniu('tapas-bucket');
// Build middleware with bucket and options
const mw = authorize.qiniu('tapas-bucket', {saveKey: 'tapas/images/$(etag)'});

// Mount
const app = koa();
app.use(mount('/auth/qiniu_token', mw));
app.listen(8080);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages