Gets file's contents as a string, throws an exception if failed.
| 144 | |
| 145 | /// Gets file's contents as a string, throws an exception if failed. |
| 146 | String readFile(const String & filepath) |
| 147 | { |
| 148 | Poco::FileInputStream ifs(filepath); |
| 149 | String res; |
| 150 | Poco::StreamCopier::copyToString(ifs, res); |
| 151 | return res; |
| 152 | } |
| 153 | |
| 154 | /// Makes credentials based on the server config. |
| 155 | std::shared_ptr<grpc::ServerCredentials> makeCredentials(const Poco::Util::AbstractConfiguration & config) |