mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			378 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const { TestServer } = require('../../../utils/testserver/');
 | 
						|
// delay creating the server to test waiting for it
 | 
						|
setTimeout(() => {
 | 
						|
  TestServer.create(__dirname, process.argv[2] || 3000).then(server => {
 | 
						|
    console.log(`Listening on http://localhost:${server.PORT}`);
 | 
						|
    server.setRoute('/hello', (message, response) => {
 | 
						|
      response.end('hello');
 | 
						|
    });
 | 
						|
  });
 | 
						|
}, 750);
 |