ariketari dagokion index.js fitxategia
This commit is contained in:
		
							parent
							
								
									350828e346
								
							
						
					
					
						commit
						5124690b03
					
				
							
								
								
									
										15
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								index.js
									
									
									
									
									
								
							| @ -1,12 +1,9 @@ | ||||
| const express = require('express'); | ||||
| const app = express(); | ||||
| const http = require('http'); | ||||
| 
 | ||||
| app.set('port', 8080); | ||||
| 
 | ||||
| app.get('/', (req, res) => { | ||||
| 	res.status(200).send('Hello World!!'); | ||||
| const server = http.createServer(function(req, res){ | ||||
| 	res.writeHead(200); | ||||
| 	res.end('Hello World!!'); | ||||
| }); | ||||
| 
 | ||||
| app.listen(app.get('port'), () => { | ||||
| 	console.log('Zerbitzaria martxan ' + app.get('port') + ' atakan'); | ||||
| }); | ||||
| server.listen(8080); | ||||
| console.log('http zerbitzaria lanean 8080 atakan...'); | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user