Using shell only to build a web application, based on netcat and nginx, FastCGI.
- netcat version:
docker pull tanglizi/shell-webapp docker run --name shell-webapp -p 8080:8080 -d tanglizi/shell-webapp
- nginx version:
to be continue
- netcat version:
git clone https://github.com/TangliziGit/shell-webapp.git cd shell-webapp chmod +x dispatcher.sh handler/* render/* util/*
- nginx version:
git clone https://github.com/TangliziGit/shell-webapp.git cd shell-webapp # modify your nginx.conf cp nginx.conf /etc/nginx/nginx.conf
To run the server, netcat version:
./dispatcher.sh 8080
nginx version:
systemctl restart nginx
systemctl restart fcgiwrap
To run a client, you can open a browser and just go http://localhost:8080
.
Or you can curl localhost:8080
Requires bats to process unit testing.
bats test/*.bats
- page rendering
- basic logging
- routing
- forward and redirect
- custom HTTP header
- unit testing
- docker
- Github CI/CD on shell scripts and Dockerfile lint & build
- nginx
- web server
- page rendering
- basic logging
- routing
- forward and redirect
- custom HTTP header
- HTTP status table
- unit testing for handlers
- docker
- Github CI/CD on shell scripts and Dockerfile lint & build
- nginx
- [] update nginx docker
- README: explain how it works
- learn how to write shell
- basic secure
Notable knowledge about the implementation process is placed in notes.md
.
MIT License
Copyright (c) 2019 Chunxu Zhang