update readme
This commit is contained in:
parent
a8d9df5a35
commit
fda673e52a
|
@ -3,6 +3,7 @@
|
||||||
x64
|
x64
|
||||||
log
|
log
|
||||||
pgsql
|
pgsql
|
||||||
|
config.json
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
*.d
|
*.d
|
||||||
|
|
19
README.md
19
README.md
|
@ -3,8 +3,21 @@
|
||||||
*A Boost Based C++ HTTP JSON Server.*
|
*A Boost Based C++ HTTP JSON Server.*
|
||||||
|
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- VS2019
|
||||||
|
- CMake
|
||||||
|
- PostgreSQL
|
||||||
|
> *The database may not be installed locally. You should be able to connect to it.*
|
||||||
|
- Other Dependencies
|
||||||
|
> Refer to [readme](/dependencies/README.md) for setting up other dependencies.
|
||||||
|
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
|
Use VS2019 to open `WebApp/WebApp.sln`, which is a sample project. [`config-example.json`](config-example.json) is a sample config file for `WebApp`'s startup parameters. **It should be renamed to `config.json` before you `Run` the project.**
|
||||||
|
|
||||||
|
|
||||||
### Database
|
### Database
|
||||||
|
|
||||||
You can import the sample database:
|
You can import the sample database:
|
||||||
|
@ -18,9 +31,3 @@ You can import the sample database:
|
||||||
```
|
```
|
||||||
psql bserv < db.sql
|
psql bserv < db.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
Refer to [readme](/dependencies/README.md) for setting up dependencies.
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"port": 8080,
|
"port": 8080,
|
||||||
"thread-num": 2,
|
"thread-num": 2,
|
||||||
"conn-num": 4,
|
"conn-num": 4,
|
||||||
"conn-str": "postgresql://username:password@localhost:5432/bserv",
|
"conn-str": "postgresql://[username]:[password]@[url]:[port]/[db]",
|
||||||
"static_root": "../../templates/statics",
|
"static_root": "../../templates/statics",
|
||||||
"template_root": "../../templates"
|
"template_root": "../../templates"
|
||||||
}
|
}
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
CMD:
|
CMD:
|
||||||
```
|
```
|
||||||
git clone --single-branch --branch master --recursive https://github.com/boostorg/boost.git
|
|
||||||
cd boost
|
cd boost
|
||||||
bootstrap
|
bootstrap
|
||||||
b2
|
b2
|
||||||
|
@ -14,11 +13,6 @@ b2
|
||||||
|
|
||||||
## [Crypto++](https://cryptopp.com/)
|
## [Crypto++](https://cryptopp.com/)
|
||||||
|
|
||||||
CMD:
|
|
||||||
```
|
|
||||||
git clone https://github.com/weidai11/cryptopp.git
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Go to `cryptopp`.
|
1. Go to `cryptopp`.
|
||||||
2. Use VS2019 to open `cryptest.sln`.
|
2. Use VS2019 to open `cryptest.sln`.
|
||||||
3. For `Debug` `x64` configuration, open `Properties` of `cryptlib` project. In `C/C++` `Code Generation`, set `Runtime Library` to `Multithreading Debug DLL (/MDd)`.
|
3. For `Debug` `x64` configuration, open `Properties` of `cryptlib` project. In `C/C++` `Code Generation`, set `Runtime Library` to `Multithreading Debug DLL (/MDd)`.
|
||||||
|
@ -34,11 +28,6 @@ git clone https://github.com/weidai11/cryptopp.git
|
||||||
|
|
||||||
# [Libpqxx](https://github.com/jtv/libpqxx)
|
# [Libpqxx](https://github.com/jtv/libpqxx)
|
||||||
|
|
||||||
CMD:
|
|
||||||
```
|
|
||||||
git clone https://github.com/jtv/libpqxx.git
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Go to `libpqxx`.
|
1. Go to `libpqxx`.
|
||||||
2. Use `cmake-gui`:
|
2. Use `cmake-gui`:
|
||||||
- `Browse Source...` and `Browse Build...` to the root directory of `libpqxx`.
|
- `Browse Source...` and `Browse Build...` to the root directory of `libpqxx`.
|
||||||
|
@ -52,7 +41,4 @@ git clone https://github.com/jtv/libpqxx.git
|
||||||
|
|
||||||
# [inja](https://github.com/pantor/inja)
|
# [inja](https://github.com/pantor/inja)
|
||||||
|
|
||||||
CMD:
|
*Nothing should be done...*
|
||||||
```
|
|
||||||
git clone https://github.com/pantor/inja.git
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue