File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,13 @@ A lightning-fast URL shortener service built with Rust. Turn long, unwieldy URLs
41
41
cargo run
42
42
```
43
43
44
- 4 . ** Enjoy at http://localhost:8081 **
44
+ 4 . ** Enjoy at http://localhost:8080 **
45
45
46
46
## 🔌 API Guide
47
47
48
48
### Shorten a URL
49
49
``` bash
50
- curl -X POST http://localhost:8081 /api/shorten \
50
+ curl -X POST http://localhost:8080 /api/shorten \
51
51
-H " Content-Type: application/json" \
52
52
-d ' {"url": "https://example.com/very/long/path"}'
53
53
```
@@ -61,18 +61,18 @@ Response:
61
61
62
62
### Create Custom Short URL
63
63
``` bash
64
- curl -X POST http://localhost:8081 /api/shorten \
64
+ curl -X POST http://localhost:8080 /api/shorten \
65
65
-H " Content-Type: application/json" \
66
66
-d ' {"url": "https://rust-lang.org", "custom_id": "rust"}'
67
67
```
68
68
69
69
### Get Link Stats
70
70
``` bash
71
- curl http://localhost:8081 /api/stats/abc123
71
+ curl http://localhost:8080 /api/stats/rust
72
72
```
73
73
74
74
### Use Your Short Link
75
- Just open ` http://localhost:8081/abc123 ` in your browser!
75
+ Just open ` http://localhost:8080/rust ` in your browser!
76
76
77
77
## 🧪 Testing
78
78
You can’t perform that action at this time.
0 commit comments