final
This commit is contained in:
		
							
								
								
									
										14
									
								
								task15/app.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								task15/app.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| const http = require('http'); | ||||
| const fs = require('fs'); | ||||
|  | ||||
| http.createServer(function (request, response) { | ||||
|     fs.readFile('index.html', 'utf8', function (error,data)  | ||||
|     { | ||||
|         let message = 'Изучаем Node.js'; | ||||
|         let header = 'Главная страница'; | ||||
|         dataNew = data | ||||
|             .replace('{header}', header) | ||||
|             .replace('{message}', message); | ||||
|         response.end(dataNew); | ||||
|     }); | ||||
| }).listen(3000); | ||||
							
								
								
									
										12
									
								
								task15/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								task15/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|     <head> | ||||
|         <title>Главная</title> | ||||
|         <meta charset="utf-8" /> | ||||
|     </head> | ||||
|     <body> | ||||
|         <h1>{header}</h1> | ||||
|         <p>{message}</p> | ||||
|     </body> | ||||
|     <html></html> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user
	 kogleee
					kogleee