forked from loafle/openapi-generator-original
[C++ server] Adjust the names (script, sample folder, generator) to lang option (#250)
* Renamce C++ server scripts * Change output folder * Rename sample folder: pistache-server -> cpp-pistache * Rename sample folder: restbed -> cpp-restbed
This commit is contained in:
committed by
William Cheng
parent
f5f00069bd
commit
2392a09eeb
29
samples/server/petstore/cpp-pistache/PetApiMainServer.cpp
Normal file
29
samples/server/petstore/cpp-pistache/PetApiMainServer.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
#include "pistache/endpoint.h"
|
||||
#include "pistache/http.h"
|
||||
#include "pistache/router.h"
|
||||
#include "PetApiImpl.h"
|
||||
|
||||
using namespace org::openapitools::server::api;
|
||||
|
||||
int main() {
|
||||
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080));
|
||||
|
||||
PetApiImpl server(addr);
|
||||
server.init(2);
|
||||
server.start();
|
||||
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user