Hello D0xzen,
you don't need to create a new project.
Add a new api route to your express instance to handle all requests that come from your frontend javascript code, for example:
app.post("/api/posts",(req,res)=>{// call your service/model or directly db instanceaddPostToDB(req.body).then(newPost=>res.json(newPost).catch(err=>res.status(500).json({msg:"Cannot add a new post"});};
or for likes:
app.post("/api/likes/:postId",(req,res)=>{// call your service/model or directly db instanceupdateLikes(req.params.postId).then(likes=>res.json(likes).catch(err=>res.status(500).json({msg:"Cannot add a new like"});};
Hello D0xzen,
you don't need to create a new project.
Add a new api route to your express instance to handle all requests that come from your frontend javascript code, for example:
or for likes:
Thanks Kryz :D
Yeah at the end i did like that