feat: simple dev.sh script to launch development environment
This commit is contained in:
24
dev.sh
Executable file
24
dev.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
trap ctrl_c INT
|
||||||
|
|
||||||
|
function ctrl_c() {
|
||||||
|
stop
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop() {
|
||||||
|
kill %3
|
||||||
|
kill %2
|
||||||
|
kill %1
|
||||||
|
|
||||||
|
wait
|
||||||
|
}
|
||||||
|
|
||||||
|
npm run watch &
|
||||||
|
./gradlew classes --continuous &
|
||||||
|
./gradlew bootRun &
|
||||||
|
|
||||||
|
read -rp "Press Enter to stop"
|
||||||
|
|
||||||
|
stop
|
||||||
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
public class HomeController {
|
public class HomeController {
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
public String home(Model model) {
|
public String home(Model model) {
|
||||||
model.addAttribute("message", "Hello Thymeleaf!");
|
model.addAttribute("message", "Hello Thymeleaf!xxx");
|
||||||
return "home";
|
return "home";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 class="bg-red-200" th:text="${message}">Placeholder message</h1>
|
<h1 class="bg-red-200" th:text="${message}">Placeholder message</h1>
|
||||||
<p>Test x</p>
|
|
||||||
<p>Test 2</p>
|
<p>Test 2</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user