diff --git a/src/week1/day0/index.html b/src/week1/day0/index.html
new file mode 100644
index 0000000..d2d8b1f
--- /dev/null
+++ b/src/week1/day0/index.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ Index
+
+
+
+
+
+
+ # |
+ description |
+ quantity |
+ $ |
+
+
+
+
+ 1 |
+ ... |
+ ... |
+ ... |
+
+
+ 2 |
+ ... |
+ ... |
+ ... |
+
+
+
+
+
\ No newline at end of file
diff --git a/src/week1/day0/media_content.html b/src/week1/day0/media_content.html
new file mode 100644
index 0000000..f4112ee
--- /dev/null
+++ b/src/week1/day0/media_content.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+ Media content
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/week1/day0/media_queries.css b/src/week1/day0/media_queries.css
new file mode 100644
index 0000000..d99c58b
--- /dev/null
+++ b/src/week1/day0/media_queries.css
@@ -0,0 +1,12 @@
+@media (min-width: 40rem) {
+ html {
+ font-size: 112%;
+ }
+ }
+
+ /* large screen (1024px) */
+ @media (min-width: 64rem) {
+ html {
+ font-size: 120%;
+ }
+ }
\ No newline at end of file
diff --git a/src/week1/day0/style.css b/src/week1/day0/style.css
new file mode 100644
index 0000000..464a3d4
--- /dev/null
+++ b/src/week1/day0/style.css
@@ -0,0 +1,33 @@
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+body {
+ line-height: 1;
+ background-color: antiquewhite;
+ text-align: center;
+ font-size: 34px;
+}
+
+header {
+ text-align: center;
+ background-color: darkgray;
+}
+
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ background-color: cornflowerblue;
+}
\ No newline at end of file
diff --git a/src/week1/day0/todo_list.html b/src/week1/day0/todo_list.html
new file mode 100644
index 0000000..c0b0fde
--- /dev/null
+++ b/src/week1/day0/todo_list.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ My todo list
+
+
+
+
+ - task 1
+ - task 2
+ - task 3
+ - task ...
+
+
+
\ No newline at end of file
diff --git a/src/week1/days2-5/expanses_table.html b/src/week1/days2-5/expanses_table.html
new file mode 100644
index 0000000..8f6ca84
--- /dev/null
+++ b/src/week1/days2-5/expanses_table.html
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Expenses |
+ Cost |
+
+
+ Comida |
+ $800 |
+
+
+ Transporte |
+ $500 |
+
+
+ Internet |
+ $500 |
+
+
+
+
+
\ No newline at end of file
diff --git a/src/week1/days2-5/image.html b/src/week1/days2-5/image.html
new file mode 100644
index 0000000..07020cb
--- /dev/null
+++ b/src/week1/days2-5/image.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+ Image
+
+ Video
+
+ Audio
+
+
+
+
\ No newline at end of file
diff --git a/src/week1/days2-5/index.html b/src/week1/days2-5/index.html
new file mode 100644
index 0000000..63e7824
--- /dev/null
+++ b/src/week1/days2-5/index.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+ - Learn
+ - Eat
+ - Study
+ - Work
+
+
+
+
\ No newline at end of file
diff --git a/src/week1/days2-5/sing_out.html b/src/week1/days2-5/sing_out.html
new file mode 100644
index 0000000..5d9b975
--- /dev/null
+++ b/src/week1/days2-5/sing_out.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/week2/day1/index.html b/src/week2/day1/index.html
index 246e778..ce98f42 100644
--- a/src/week2/day1/index.html
+++ b/src/week2/day1/index.html
@@ -1,16 +1,81 @@
+-->
\ No newline at end of file
diff --git a/src/week2/day2/indexErrors.html b/src/week2/day2/indexErrors.html
index f72446f..92c3556 100644
--- a/src/week2/day2/indexErrors.html
+++ b/src/week2/day2/indexErrors.html
@@ -4,7 +4,7 @@
(function(){
"use strict";
var willPass = "Hi there";
- wontPass = "nope";
+ var wontPass = "nope";
console.log(`willPass = ${willPass}`);
console.log(`wontPass = ${wontPass}`);
@@ -12,7 +12,7 @@
let someArr = [1, 2, 3, 4];
function giveMe(inx) {
- return someArr[counter];
+ return someArr[inx];
}
for (let counter= 0; counter <= someArr.length; counter++) {
diff --git a/src/week2/day3/indexDOM.html b/src/week2/day3/indexDOM.html
index fe114cd..db59be6 100644
--- a/src/week2/day3/indexDOM.html
+++ b/src/week2/day3/indexDOM.html
@@ -1,11 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+-->
\ No newline at end of file
diff --git a/src/week2/day3/indexEvents.html b/src/week2/day3/indexEvents.html
index 7fc3f8a..ffdfc9e 100644
--- a/src/week2/day3/indexEvents.html
+++ b/src/week2/day3/indexEvents.html
@@ -1,11 +1,40 @@
+
+
+
+
+
+
+
+Da click aqui
+
+
+
+
+
+
+-->
\ No newline at end of file
diff --git a/src/week2/day4-5/expressDemo.js b/src/week2/day4-5/expressDemo.js
index 000831f..64ab6a2 100644
--- a/src/week2/day4-5/expressDemo.js
+++ b/src/week2/day4-5/expressDemo.js
@@ -1,4 +1,5 @@
-const express = ;
+const express = require("express");
+const fs = require("fs");
const app = express();
const port = 3000;
@@ -6,6 +7,21 @@ app.get('/', (req, res) => {
res.send('Hello There!');
})
+app.get('/ramdom', (req, res) => {
+ res.send(`Random number: ${parseInt(Math.random() * 10)}`)
+})
+
+// app.get('/bonus', (req, res) => {
+// res.send(`Bonus ok`)
+// })
+
+app.get('/json', (req, res) => {
+ fs.readFile(__dirnaame + '/package.json', function (err, data) {
+ if (err) throw err;
+ res.send(data.toString());
+ })
+})
+
app.listen(port, () => {
console.log('Example server listening on port ' + port);
console.log('Enter http://localhost:' + port + ' on your browser')
diff --git a/src/week2/day4-5/fsDemo.js b/src/week2/day4-5/fsDemo.js
index 8d42541..2469e3b 100644
--- a/src/week2/day4-5/fsDemo.js
+++ b/src/week2/day4-5/fsDemo.js
@@ -2,13 +2,19 @@ const fs = require('fs');
var fileName = "test.txt",
content = "Hey There!";
-fs.writeFile(__dirname + "/" + fileName, content, function(err) {
- if(err) {
- return console.log(err)
- }
- console.log("The file was saved!");
-});
+fs.stat(__dirname + "/" + fileName, (err) => {
+ if (err) {
+ fs.writeFile(__dirname + "/" + fileName, content, function (err) {
+ if (err) {
+ return console.log(err)
+ }
+ console.log("The file was saved!");
+ });
+ } else {
+ console.log("Existe archivo")
+ }
+})
// This is a node app, this code saves a file on the current path with
// the content on the variable with that name.