chat worksgit add .!
This commit is contained in:
@@ -22,5 +22,9 @@ func main() {
|
|||||||
router.GET("/api/rooms", func(c *gin.Context) {
|
router.GET("/api/rooms", func(c *gin.Context) {
|
||||||
c.JSON(200, gin.H{"rooms": "TODO"})
|
c.JSON(200, gin.H{"rooms": "TODO"})
|
||||||
})
|
})
|
||||||
|
router.Static("/static", "./static")
|
||||||
|
router.GET("/", func(c *gin.Context) {
|
||||||
|
c.File("./static/index.html")
|
||||||
|
})
|
||||||
router.Run(":8080")
|
router.Run(":8080")
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -39,6 +39,6 @@
|
|||||||
<button onclick="sendMessage()">Send</button>
|
<button onclick="sendMessage()">Send</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/chat.js"></script>
|
<script src="/static/js/chat.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user