-
Notifications
You must be signed in to change notification settings - Fork 32
/
mod.ts
38 lines (30 loc) · 1.4 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
////////////////////////////////////////////////////////////////////////////////
// FILE MARKER - IMPORTS ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
import * as Interfaces from "./src/interfaces.ts";
import * as Types from "./src/types.ts";
import { Server } from "./src/http/server.ts";
////////////////////////////////////////////////////////////////////////////////
// FILE MARKER - EXPORTS - CLASSES /////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
function getVersion() {
const url = import.meta.url;
if (url.match(/v\d/) === null) {
return null;
}
return "v" + url.split("v")[1].split("/")[0];
}
export const version = getVersion();
// Dictionaries
export { mimeDb as MimeDb } from "./src/dictionaries/mime_db.ts";
// Errors
export * as Errors from "./src/errors.ts";
// Http
export { DrashRequest as Request } from "./src/http/request.ts";
export { Resource } from "./src/http/resource.ts";
export { DrashResponse as Response } from "./src/http/response.ts";
export { Service } from "./src/http/service.ts";
export { ErrorHandler } from "./src/http/error_handler.ts";
// Export members from the IMPORTS section above
export { Interfaces, Server, Types };
export type { IErrorHandler, IResource, IService } from "./src/interfaces.ts";