chore: minor edits
This commit is contained in:
parent
cfb7881a5b
commit
86f036d8cc
3 changed files with 2 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
RUN apt-get update && apt-get install socat file -y
|
RUN apt-get update && apt-get install socat file pandoc -y
|
||||||
ENV HTTB_LIB_PATH="/usr/lib/httb"
|
ENV HTTB_LIB_PATH="/usr/lib/httb"
|
||||||
WORKDIR ${HTTB_LIB_PATH}
|
WORKDIR ${HTTB_LIB_PATH}
|
||||||
COPY src/ .
|
COPY src/ .
|
||||||
|
|
23
README.md
23
README.md
|
@ -31,29 +31,6 @@ To get started with Docker:
|
||||||
# Add your additional setup steps here, if needed
|
# Add your additional setup steps here, if needed
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Run the Docker container using `docker-compose`**:
|
|
||||||
```sh
|
|
||||||
docker-compose up --build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example `docker-compose.yml`
|
|
||||||
Here is an example `docker-compose.yml` file to help you get started:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
|
||||||
httb:
|
|
||||||
image: httb:latest
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
```
|
|
||||||
|
|
||||||
With these steps and files, you should be able to set up and run your httb server in a Docker container.
|
|
||||||
|
|
||||||
## 🖥️ Native
|
## 🖥️ Native
|
||||||
If you prefer to run httb natively on your system, ensure you have `bash socat file` installed. These tools are necessary for running this server.
|
If you prefer to run httb natively on your system, ensure you have `bash socat file` installed. These tools are necessary for running this server.
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ http::_route_request() {
|
||||||
for glob_endpoint in "${!http__all_routes[@]}"; do # FIXME O(n)
|
for glob_endpoint in "${!http__all_routes[@]}"; do # FIXME O(n)
|
||||||
# shellcheck disable=SC2053
|
# shellcheck disable=SC2053
|
||||||
if [[ "${request_path}" == ${glob_endpoint} ]]; then
|
if [[ "${request_path}" == ${glob_endpoint} ]]; then
|
||||||
|
declare -rx HTTP_REQUEST_GLOB="${glob_endpoint}"
|
||||||
path_found=1
|
path_found=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue