Skip to content

silentport/githubAsImageServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

githubAsImageServer

Build Status undefined

A Koa middleware that use github.io as image repository

usage

 npm i github-as-image-server -S
const Koa = require('koa')
const app = new Koa()

const githubAsImageServer = require('../lib');

app.use(githubAsImageServer({
  targetDir: `D:/project/silentport.github.io`, // local path of git repo
  repo: 'https://github.com/silentport/silentport.github.io.git', // address of git repo
  url: 'https://silentport.github.io', // host of your github.io
  dir: 'upload', // dirname will save image
  project: 'blog', // child dirname will save image
  router: '/upload' // path of request
}))


app.listen(8002, () => {
  console.log('server is started!');
})

About

use github.io as image server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published