-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.nim
41 lines (33 loc) · 1.1 KB
/
app.nim
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
import prologue
import faq_page
import landing_page
import contribute_page
import edit_section_page
import cgpt_page
import consts
import prologue/middlewares/staticfile
import admin
import whitelist
let settings =
newSettings(
appName = consts.app_name ,
debug = consts.debug ,
port = Port(consts.port) ,
secretKey = consts.app_secret
)
var app = newApp(settings = settings)
app.use(staticFileMiddleware("/static"))
app.get("/favicon.ico", redirectTo("/static/favicon.ico"))
app.addRoute(@[
landing_route ,
contribute_route ,
edit_section_route ,
faq_route ,
cgpt_route ,
admin_route ,
whitelist_api_route ,
contact_form_submit_route ,
cgpt_selection_route ,
login_route ,
], "")
app.run()