-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
dockerfile | ||
./package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.8' | ||
|
||
services: | ||
web: | ||
image: node:16-alpine | ||
working_dir: /app | ||
volumes: | ||
- .:/app | ||
command: npm run start | ||
ports: | ||
- 4000:4000 | ||
volumes: | ||
app: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Calculator Terminal Rules</title> | ||
<style> | ||
body { | ||
font-family: sans-serif; | ||
background-color: #ffffff; | ||
color: #000000; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Calculator Terminal Rules</h1> | ||
<p>The calculator terminal is a powerful tool that can be used to perform calculations. However, there are some rules that you should follow when using the calculator terminal.</p> | ||
<ul> | ||
<li style="color:red;">Do not type any commands that you do not understand.</li> | ||
<li style="color:orange;">Do not type any commands that could damage your computer.</li> | ||
<li style="color:green;">Do not type any commands that could violate the privacy of others.</li> | ||
</ul> | ||
<p>If you have any questions about the calculator terminal, please consult the documentation or contact your system administrator.</p> | ||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const http = require('http'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const port = 4000; // Puerto en el que se ejecutará el servidor | ||
|
||
http.createServer((req, res) => { | ||
const filePath = path.join(__dirname, 'index.html'); // Ruta al archivo HTML | ||
fs.readFile(filePath, 'utf8', (err, content) => { | ||
if (err) { | ||
res.writeHead(500); | ||
res.end(`Error al leer el archivo: ${err}`); | ||
return; | ||
} | ||
res.writeHead(200, { 'Content-Type': 'text/html' }); | ||
res.end(content); | ||
}); | ||
}).listen(port); | ||
|
||
console.log(`Servidor ejecutándose en http://localhost:${port}`); |