⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (728 Bytes)
Bug #13623
» main.cpp
Steven Köhler
, 03/06/2025 08:22 AM
#include
<Wt/WApplication.h>
#include
<Wt/WServer.h>
class
DemoApp
:
public
Wt
::
WApplication
{
public:
DemoApp
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
{
env
}
{
doJavaScript
(
"console.log('this is executed twice');"
,
false
);
require
(
"js1.js"
);
doJavaScript
(
"console.log('this is executed twice, too');"
,
false
);
require
(
"js2.js"
);
doJavaScript
(
"console.log('this is not');"
,
false
);
}
};
//!
//!
//!
int
main
(
int
argc
,
char
**
args
)
{
Wt
::
WServer
server
(
argc
,
args
);
server
.
addEntryPoint
(
Wt
::
EntryPointType
::
Application
,
[](
const
Wt
::
WEnvironment
&
env
)
{
return
std
::
make_unique
<
DemoApp
>
(
env
);
});
if
(
server
.
start
())
{
server
.
waitForShutdown
();
server
.
stop
();
}
}
« Previous
1
2
Next »
(1-1/2)
Loading...