db-lab1/README.md

34 lines
761 B
Markdown
Raw Normal View History

2021-03-05 15:39:47 +08:00
# bserv
*A Boost Based C++ HTTP JSON Server.*
2021-03-05 15:39:47 +08:00
2021-10-18 15:14:01 +08:00
## 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.
2021-03-05 15:39:47 +08:00
## Quick Start
2021-10-18 15:14:01 +08:00
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.**
2021-03-05 15:39:47 +08:00
### Database
You can import the sample database:
- Create the database in `psql`:
```
create database bserv;
```
- Create the table in the `shell` using a sample script:
```
psql bserv < db.sql
```