HYF-Class19 / home

Home repository for Class19
https://hyf-class19.github.io/home/
MIT License
9 stars 13 forks source link

Galal: asynchronous-programming-3 weeks #332

Open galalkoro98 opened 1 year ago

galalkoro98 commented 1 year ago

Learning Objectives

galalkoro98 commented 1 year ago

Week 1

I Need Help With:

until now no

What went well?

I think the concept of timeout is clear

What went less well?

week project not everything

Lessons Learned

Sunday Prep Work

begin with some toturial

galalkoro98 commented 1 year ago

Week 2

I Need Help With:

until now no

What went well?

fetch

What went less well?

week project went well

Lessons Learned

Sunday Prep Work

I watched some toturials about asychornous

galalkoro98 commented 1 year ago

Week 3

I Need Help With:

Yes I do need help with my week project which I have problem in back-end app

const fs = require("fs"); const express = require("express"); const app = express(); const PORT = process.env.PORT || 5000;

app.use(express.static(__dirname + "/")); app.use(express.json());

app.get("/getTasks", (req, res) => { const data = JSON.parse(fs.readFileSync("db.json")); console.log(data); res.json(data); });

app.post("/saveTask", (req, res) => { const data = req.body; fs.writeFileSync("db.json", JSON.stringify(data)); res.json({ status: "saved" }); });

app.listen(PORT, () => { console.log("Server is running on port " + PORT); });

What went well?

fetch

What went less well?

week project went kind a approch to the point just need some feedback

Lessons Learned

Sunday Prep Work

Headless CMS

raymundovr commented 1 year ago

Hi @galalkoro98 Great progress so far!

Perhaps I can help with the implementation that you need to perform. Feel free to reach out via Slack :)