Add a port variable.
This commit is contained in:
		
							parent
							
								
									a6260deefd
								
							
						
					
					
						commit
						0145903e70
					
				@ -3,6 +3,7 @@ require "kemal"
 | 
				
			|||||||
require "json"
 | 
					require "json"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
URL = "localhost"
 | 
					URL = "localhost"
 | 
				
			||||||
 | 
					PORT = "3000"
 | 
				
			||||||
GAME_CACHE = {} of String => Go::Game
 | 
					GAME_CACHE = {} of String => Go::Game
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def query_game(db, id) : Go::Game?
 | 
					def query_game(db, id) : Go::Game?
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
    var node = document.getElementById('elm-root')
 | 
					    var node = document.getElementById('elm-root')
 | 
				
			||||||
    var app = Elm.Main.embed(node, {
 | 
					    var app = Elm.Main.embed(node, {
 | 
				
			||||||
        'black' : <%= black %>,
 | 
					        'black' : <%= black %>,
 | 
				
			||||||
        'url' : "<%= "ws://" + URL + ":" + Kemal.config.port.to_s %>",
 | 
					        'url' : "<%= "ws://" + URL + ":" + PORT %>",
 | 
				
			||||||
        'id' : "<%= id %>",
 | 
					        'id' : "<%= id %>",
 | 
				
			||||||
        'size' : <%= size %>
 | 
					        'size' : <%= size %>
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user