How to Build a REST API in Node.js and Express.js and File JSON Database

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

thanks my brother, i had a task to build an api this video help out major

abdishakur
Автор

Thank you for this tutorial! Very simple and helpful!

rxlvnd
Автор

I want to make an api but i am not getting it how to make it

bhanupratapmahatoihhcvlyth
Автор

Thank you so much.. this made so much sense

marksorden
Автор

Thanks a lot for the video, but your title should be "How to Build a REST API in NodeJS and expressJs"

ent_World
Автор

I dont know why but when i go to server, it says 'Cannot get/ getUsers' and console says failed to load resource. Dont know why

bilalisakhan
Автор

i am not getting plz explain or give src code link

abhishekgarg
Автор

I have an error cant find module express

Ayyjob
Автор

Is this a good tutorial? Is it a bad one? I have no idea because I can't see the fking dislike ratio @Youtube

fredericbierbaum
Автор

idk why you keep it harder to read man, you can just simply make it like this. as a beginner Its hard for me to read your code.

//REST API demo in Node.js
const express = require('express');
const app = express();
const fs = require('fs');
const port = 3000

app.get('/getUsers', function(req, res){
fs.readFile(__dirname + "/" + "users.json", 'utf8', function(err, data){
console.log(data);
res.end(data); // you can also use res.send()
});
})

app.listen(port, () => {
console.log(`app is listening on port ${port}`)
})

taekosingkwala
Автор

DON"T USE THAT WEBSITE! It has so many spelling mistakes and inconsistencies

teemu