comparison mrjunejune/main.c @ 79:5710108c949e

[Seobeo] Added Redirect logic.
author June Park <parkjune1995@gmail.com>
date Thu, 01 Jan 2026 05:57:03 -0800
parents e7bf9e002850
children d55157451947
comparison
equal deleted inserted replaced
78:e7bf9e002850 79:5710108c949e
102 102
103 Dowa_HashMap_Push_Arena(resp, "body", body, arena); 103 Dowa_HashMap_Push_Arena(resp, "body", body, arena);
104 return resp; 104 return resp;
105 } 105 }
106 106
107 CREATE_REDIRECT_HANDLER(HomePage, "http://localhost:6969/")
108 CREATE_REDIRECT_HANDLER(Resume, "http://localhost:6969/resume")
109 CREATE_REDIRECT_HANDLER(Tools, "http://localhost:6969/tools")
110 CREATE_REDIRECT_HANDLER(MarkDownToHtml, "http://localhost:6969/tools/markdown_to_html")
111
107 int main(void) 112 int main(void)
108 { 113 {
109 Seobeo_Router_Init(); 114 Seobeo_Router_Init();
110 Seobeo_Router_Register("GET", "/", GetHomePage); 115 Seobeo_Router_Register("GET", "/", GetHomePage);
111 Seobeo_Router_Register("GET", "/index.html", GetHomePage); 116 Seobeo_Router_Register("GET", "/index.html", GetRedirectHomePage);
112 117
113 Seobeo_Router_Register("GET", "/resume", GetResume); 118 Seobeo_Router_Register("GET", "/resume", GetResume);
114 Seobeo_Router_Register("GET", "/resume/index.html", GetResume); 119 Seobeo_Router_Register("GET", "/resume/index.html", GetRedirectResume);
115 120
116 Seobeo_Router_Register("GET", "/tools", GetTools); 121 Seobeo_Router_Register("GET", "/tools", GetTools);
117 Seobeo_Router_Register("GET", "/tools/index.html", GetTools); 122 Seobeo_Router_Register("GET", "/tools/index.html", GetRedirectTools);
118 123
119 Seobeo_Router_Register("GET", "/tools/markdown_to_html", GetMDToHTML); 124 Seobeo_Router_Register("GET", "/tools/markdown_to_html", GetMDToHTML);
120 Seobeo_Router_Register("GET", "/tools/markdown_to_html/index.html", GetMDToHTML); 125 Seobeo_Router_Register("GET", "/tools/markdown_to_html/index.html", GetRedirectMarkDownToHtml);
121 126
122 Seobeo_Web_Server_Start("mrjunejune/pages", "6969", SEOBEO_MODE_EDGE, 2); 127 Seobeo_Web_Server_Start("mrjunejune/pages", "6969", SEOBEO_MODE_EDGE, 2);
123 } 128 }