File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
blog/25-07-24/http-server Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,33 @@ <h1 class=title>
115115
116116 < div id =snippet-root >
117117
118- < div id =btns >
119- < input value =download type =button >
118+ < div class =blog-text >
119+
120+ < h4 class =blog-hdr >
121+ http-server-simple-example.js
122+ </ h4 >
123+
124+ < p >
125+ This example demonstrates a simple server, it produces cors responses, has a built-in /hello page
126+ and has a built-in favicon.
127+ </ p >
128+ < p >
129+ It serves files local to the base directory where the server was run and produces
130+ a 400 badrequest when the requested url maps to a directory outside the directory where the server is located
131+ such as '../test.txt'.
132+ </ p >
133+ < p >
134+ The mime function will need to built up should you require it.
135+ </ p >
136+
137+ < div id =btns >
138+ < input value =download type =button >
139+ </ div >
140+
120141 </ div >
121142
143+
144+
122145 < snippet-terminal-console component id =snippet type =nodejs src ='ex/http-server-simple-example.js ' web-console ='h=100 '> </ snippet-terminal-console >
123146
124147 </ div >
You can’t perform that action at this time.
0 commit comments