bashd
1.0.0

프로젝트를 복제하십시오
git clone https://github.com/AlexGustafsson/bashd
폴더로 이동하십시오
cd bashd
서버를 시작하십시오
./bashd
QuickStart
특징
용법
기여
FAQ
경로 정의
route get / homePage
# Special 404 route - handles all 404s
route get 404 notFoundPage
# POST a message to the echo page to hear it back louder!
route post /echo echoPage페이지 처리
function homePage {
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
EOF
}
function notFoundPage {
setResponseCode " 404 "
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1>Cannot find $HTTP_METHOD $HTTP_PATH </h1>
</body>
</html>
EOF
}
function echoPage {
startResponse
cat << EOF
<html>
<head></head>
<body>
<h1> ${HTTP_BODY_MESSAGE^^} </h1>
</body>
</html>
EOF
}Q : 작동합니까? A : 그렇습니다.
Q : 안전합니까? A : 아니요.
Q : 농담입니까? A : 대부분.
프로젝트에 대한 도움은 환영받는 것 이상입니다. 의심스러운 경우 문제를 게시하십시오.