Skip to content

Commit 4d1d765

Browse files
formatting, again
1 parent 095f0dd commit 4d1d765

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,25 @@
11
# teenyHTTP
2-
32
### A basic HTTP server written in precisely 100 lines of Go.
4-
53
The install script has more lines of Bash than the actual `main.go` source file. Even this `README.md` file was written in more lines than teenyHTTP.
6-
74
---
8-
95
## Features:
10-
116
- Manual overriding of paths
127
- No dependencies (install helper script requires Bash (unless you compile it yourself))
138
- Easy port selection
14-
159
---
16-
1710
## Install & Setup:
18-
1911
### Install
20-
2112
0) Ensure you have `Bash` installed
2213
> [!NOTE]
2314
> not needed if not using install helper script
24-
2515
```shell
2616
command -v bash
2717
```
28-
29-
3018
1) `cd` into your working directory
3119
(replace `/your/path/to/your/files` with your path)
3220
```shell
3321
cd /your/path/to/your/files
3422
```
35-
36-
3723
2) Run the setup script
3824
```shell
3925
curl -fsSL https://raw.githubusercontent.com/supraboy981322/teenyHTTP/main/install-1.sh | sh
@@ -42,20 +28,15 @@ OR
4228
```shell
4329
wget -fsSL https://raw.githubusercontent.com/supraboy981322/teenyHTTP/main/install-1.sh | sh
4430
```
45-
46-
4731
3) Follow the on-screen instructions
4832

49-
5033
### Setup
51-
5234
1) Create a systemd service file
5335
(you may need `su` permissions, replace `nvim` with your prefered text editor, such as `nano` [`nano` is easier than `nvim`])
5436
```shell
5537
nvim /etc/systemd/system/teenyHTTP.service
5638
```
5739

58-
5940
2) Enter the following
6041
(replace `/your/working/directory/` with the directory of your configuration JSON files and files to serve, and `/your/executable/path` with the directory to the teenyHTTP executable)
6142
> [!IMPORTANT]
@@ -65,7 +46,6 @@ nvim /etc/systemd/system/teenyHTTP.service
6546
[Unit]
6647
Description=the teenyHTTP web server
6748
After=syslog.target network.target
68-
6949
[Service]
7050
User=root
7151
Group=root
@@ -74,12 +54,10 @@ ExecStart=/
7454
TimeoutStopSec=20
7555
KillMode=process
7656
Restart=always
77-
7857
[Install]
7958
WantedBy=multi-user.target
8059
```
8160

82-
8361
3) Enable and start the service (you may need `su` permissions)
8462
```shell
8563
systemctl enable teenyHTTP.service
@@ -89,57 +67,45 @@ then
8967
systemctl start teenyHTTP.service
9068
```
9169

92-
9370
4) Make sure the service was started (you may need `su` permissions)
9471
```shell
9572
systemctl status teenyHTTP.service
9673
```
97-
9874
---
99-
10075
## Configuration
101-
10276
- ### Setting the port
10377

10478
1) Open your `settings.json` file
10579
(replace `/your/working/dir` with the path to your working directory, and `nvim` with your prefered text editor)
106-
10780
```shell
10881
nvim /your/working/dir/settings.json
10982
```
11083

111-
11284
2) Edit the line that has `"port":`
11385
(replace `1234` with the port you want teenyHTTP to use)
11486
```
11587
"port": "1234",
11688
```
117-
11889
- ### Changing the override setting
119-
12090
1) Open your `settings.json` file
12191
(replace `/your/working/dir` with the path to your working directory, and `nvim` with your prefered text editor)
12292
```shell
12393
nvim /your/working/dir/settings.json
12494
```
12595

126-
12796
2) Edit the line that has `"override":`
12897
(replace `1234` with the port you want teenyHTTP to use)
12998
valid options are: `true` and `false` (no quotations)
13099
```
131100
"override": false,
132101
```
133-
134102
- ### Configuring the override
135-
136103
1) Open your `override.json` file
137104
(replace `/your/working/dir` with the path to your working directory, and `nvim` with your prefered text editor)
138105
```shell
139106
nvim /your/working/dir/override.json
140107
```
141108

142-
143109
2) Create a new line in the following format after the openning brace ( `{` )
144110
```JSON
145111
"your-url/path": "your_file/path.html",

0 commit comments

Comments
 (0)