websocket-example doesn't work when I change protocol from http to https and web socket from ws to wss at port 7070
- Dominant language
- JavaScript
- Stars
- 39
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
```
Javalin app = Javalin.create(config -> {
config.registerPlugin( new SslPlugin(conf -> {
conf.keystoreFromPath(location, password);
conf.insecure = false;
conf.host = host;
conf.securePort = port;
}));
config.staticFiles.add("/public", Location.CLASSPATH);
config.router.mount(router -> {
router.ws("/chat", ws -> {
```
The html page and javascript file are stored under public folder.
error:
Failed to load resource: the server responded with a status of 404 ()Understand this errorAI
websocketDemo.js:5 WebSocket connection to 'wss://localhost:7070/chat' failed:
(anonymous) @ websocketDemo.js:5Understand this errorAI
style.css:1
Failed to load resource: the server responded with a status of 404 ()
it works when using ws and http.
Contributor guide
Assessment
This issue has not been assessed yet.