Skip to content

ByteCamp2022/HTTP-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP-Server

支持 / 、/home、 404三种url,根据不同的url调用不同module中的response函数,server命令行和浏览器都会有调用module提示.

run

cd host

cargo run

module_200

浏览器访问localhost:7878或者127.0.0.1:7878,调用module_200中的response函数,返回hello.html.

module_home

浏览器访问localhost:7878/home或者127.0.0.1:7878/home,调用module_home中的response函数,返回home.html.

module_404

浏览器访问localhost:7878/hahaha或者127.0.0.1:7878/xyz等其他任意不存在的目录,调用module_home中的response函数,返回404.html.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors