feat: support configurable ws port and remote development (#429)
Co-authored-by: Jeremy Press <jeremy@replit.com> Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This commit is contained in:
		@@ -76,6 +76,16 @@ export const BuildArgv = {
 | 
			
		||||
    default: 8080,
 | 
			
		||||
    describe: "port to serve Quartz on",
 | 
			
		||||
  },
 | 
			
		||||
  wsPort: {
 | 
			
		||||
    number: true,
 | 
			
		||||
    default: 3001,
 | 
			
		||||
    describe: "port to use for WebSocket-based hot-reload notifications",
 | 
			
		||||
  },
 | 
			
		||||
  remoteDevHost: {
 | 
			
		||||
    string: true,
 | 
			
		||||
    default: "",
 | 
			
		||||
    describe: "A URL override for the websocket connection if you are not developing on localhost",
 | 
			
		||||
  },
 | 
			
		||||
  bundleInfo: {
 | 
			
		||||
    boolean: true,
 | 
			
		||||
    default: false,
 | 
			
		||||
 
 | 
			
		||||
@@ -402,7 +402,7 @@ export async function handleBuild(argv) {
 | 
			
		||||
      return serve()
 | 
			
		||||
    })
 | 
			
		||||
    server.listen(argv.port)
 | 
			
		||||
    const wss = new WebSocketServer({ port: 3001 })
 | 
			
		||||
    const wss = new WebSocketServer({ port: argv.wsPort })
 | 
			
		||||
    wss.on("connection", (ws) => connections.push(ws))
 | 
			
		||||
    console.log(
 | 
			
		||||
      chalk.cyan(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user