-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
52 lines (41 loc) · 1.13 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* ==============================
* Aegis Framework | MIT License
* http://www.aegisframework.com/
* ==============================
*/
/**
* Include all modules
*
* This includes needed modules such as templates
*/
import Aegis from "./lib/Aegis";
import HTTP from "./lib/class/HTTP"
import Router from "./lib/class/Router"
import Request from "./lib/class/Request"
import main from "./lib/templates/main"
import DB from "./lib/class/DB"
import Config from "./lib/class/Config"
/**
* Debugging logs are shown on errors by default, to disable them,
* uncomment the following line.
*/
//Aegis.debugging = false;
// Connect to the Database
// DB.connect (Config.get ("DB_User"), Config.get ("DB_Password"), Config.get ("DB"));
/**
* Register Routes
*
* Register all the custom routes for your site, the callback function
* will be executed when the route is accessed.
*/
Router.get ("/", () => {
return new main ().toString ();
});
/**
* Make the router listen to requests.
*
* The router will now match any request to the previously registered
* routes and run the callback function of the match.
*/
Router.listen ();