Open galalkoro98 opened 1 year ago
until now no
I think the concept of timeout is clear
week project not everything
begin with some toturial
until now no
fetch
week project went well
I watched some toturials about asychornous
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); });
fetch
week project went kind a approch to the point just need some feedback
Headless CMS
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 :)
Learning Objectives
setTimeout
andsetInterval
to schedule simple tasks.fetch
data from RESTful APIs..then
Promise.all
system./api-calls
,/handlers
andasync
/await
syntax.async
/await
syntax.