Feature(server): add http server for uploading images by a http request

port 37766
This commit is contained in:
Molunerfinn
2019-12-31 23:50:19 +08:00
parent 3fd95725cf
commit c56d4efa79
13 changed files with 558 additions and 54 deletions

View File

@@ -7,6 +7,23 @@ interface IObjT<T> {
[propName: string]: T
}
interface ErrnoException extends Error {
errno?: number | string;
code?: string;
path?: string;
syscall?: string;
stack?: string;
}
type routeHandler = (ctx: IServerCTX) => Promise<void>
type IHttpResponse = import('http').ServerResponse
interface IServerCTX {
response: IHttpResponse
[propName: string]: any
}
// Image && PicBed
interface ImgInfo {
buffer?: Buffer