Compare commits
2 Commits
dc3fd61bd3
...
f9cb798dd8
Author | SHA1 | Date | |
---|---|---|---|
f9cb798dd8 | |||
2a3248435c |
8
.gitignore
vendored
8
.gitignore
vendored
@ -35,3 +35,11 @@ out/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### React (prod build) static files ###
|
||||
backend/src/main/resources/static/asset-manifest.json
|
||||
backend/src/main/resources/static/favicon.ico
|
||||
backend/src/main/resources/static/index.html
|
||||
backend/src/main/resources/static/manifest.json
|
||||
backend/src/main/resources/static/robots.txt
|
||||
backend/src/main/resources/static/static/*
|
@ -0,0 +1,20 @@
|
||||
package djmil.cordacheckers;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
@Controller
|
||||
public class ReactAppController {
|
||||
// This controller simply redirects all UI related routes
|
||||
// to index.html, allowing react and react-router to work its magic
|
||||
|
||||
@GetMapping(value = { "/", "/games/*","/about","/leaderboard" })
|
||||
@PutMapping("/error")
|
||||
public String getIndex(HttpServletRequest inRequest) {
|
||||
return "/index.html";
|
||||
}
|
||||
|
||||
}
|
@ -8,4 +8,6 @@ corda.root.login=admin
|
||||
corda.root.passw=admin
|
||||
corda.client.maxPollAttempts=30
|
||||
|
||||
server.port=8081
|
||||
server.port=8081
|
||||
|
||||
#logging.level.org.springframework.web=DEBUG
|
@ -13,6 +13,9 @@
|
||||
"react-scripts": "^5.0.1",
|
||||
"web-vitals": "^3.5.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "^2.x.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
@ -22,8 +25,7 @@
|
||||
"proxy": "http://localhost:8081",
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
|
@ -24,7 +24,7 @@
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>Corda Chechers</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.4 KiB |
@ -1,21 +1,11 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"short_name": "Checkers",
|
||||
"name": "Corda Checkers",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
|
Loading…
Reference in New Issue
Block a user