FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/example/readme.cpp at master · expresscpp/expresscpp · GitHub
expresscpp
/
expresscpp
Public
Notifications
You must be signed in to change notification settings
Fork
15
Star
96
Code
Issues
5
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
example
/
readme.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
9 lines (9 loc) · 376 Bytes
Breadcrumbs
expresscpp
/
example
/
readme.cpp
Copy path
File metadata and controls
9 lines (9 loc) · 376 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
#
include
"
expresscpp/expresscpp.hpp
"
int
main
() {
auto
expresscpp = std::make_shared<expresscpp::ExpressCpp>();
expresscpp->
Get
(
"
/
"
, [](
auto
/*
req
*/
,
auto
res) { res->
Send
(
"
hello world!
"
); });
constexpr
uint16_t
port =
3000u
;
expresscpp->
Listen
(port, [=](
auto
/*
ec
*/
) { std::cout <<
"
Example app listening on port
"
<< port << std::endl; })
.
Run
();
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL