Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToDo-App Jan Schnaidt and Abdullah Kiran
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abdullah Kiran
ToDo-App Jan Schnaidt and Abdullah Kiran
Commits
78138a13
Commit
78138a13
authored
6 months ago
by
abdu
Browse files
Options
Downloads
Patches
Plain Diff
add controller for routing in vue history mode, update Dockerfile
parent
a487e61b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+2
-2
2 additions, 2 deletions
Dockerfile
src/main/java/com/cloudcomputing/todo/controller/FallbackController.java
+14
-0
14 additions, 0 deletions
...om/cloudcomputing/todo/controller/FallbackController.java
with
16 additions
and
2 deletions
Dockerfile
.backend
→
Dockerfile
+
2
−
2
View file @
78138a13
# need node/npm to run "npm run build" for our vue frontend
FROM node:20-alpine
as
build-frontend
FROM
node:20-alpine
AS
build-frontend
# working directory for our frontend
WORKDIR
/app
...
...
@@ -22,7 +22,7 @@ FROM eclipse-temurin:17-jre-alpine as build-backend
WORKDIR
/app
# copying frontend to static folder so spring can serve it
COPY --from
build-frontend /app/dist /app/src/main/resources/static
COPY
--from
=
build-frontend /app/dist /app/src/main/resources/static
# copying backend to root folder in container
COPY
. .
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/cloudcomputing/todo/controller/FallbackController.java
0 → 100644
+
14
−
0
View file @
78138a13
package
com.cloudcomputing.todo.controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
public
class
FallbackController
{
@RequestMapping
(
value
=
"/**/{path:[^\\.]*}"
)
public
String
redirect
(){
return
"forward:/index.html"
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment