mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Changed the order of parameters of set_mounting_point.
This commit is contained in:
parent
82c11168c1
commit
ac7742bb32
4 changed files with 13 additions and 13 deletions
|
@ -51,17 +51,17 @@ svr.listen_after_bind();
|
|||
|
||||
```cpp
|
||||
// Mount / to ./www directory
|
||||
auto ret = svr.set_mount_point("./www", "/");
|
||||
auto ret = svr.set_mount_point("/", "./www");
|
||||
if (!ret) {
|
||||
// The specified base directory doesn't exist...
|
||||
}
|
||||
|
||||
// Mount /public to ./www directory
|
||||
ret = svr.set_mount_point("./www", "/public");
|
||||
ret = svr.set_mount_point("/public", "./www");
|
||||
|
||||
// Mount /public to ./www1 and ./www2 directories
|
||||
ret = svr.set_mount_point("./www1", "/public"); // 1st order to search
|
||||
ret = svr.set_mount_point("./www2", "/public"); // 2nd order to search
|
||||
ret = svr.set_mount_point("/public", "./www1"); // 1st order to search
|
||||
ret = svr.set_mount_point("/public", "./www2"); // 2nd order to search
|
||||
|
||||
// Remove mount /
|
||||
ret = svr.remove_mount_point("/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue