I'm probably not the only one that started looking for different node packages for a simple file DB solution, and ended up having problems with packages not supporting commonjs and fiddling around with the Typescript compiler to get compiled esm files unsuccessfully. This video made me motivated to try out working with JSON without having to rely on mysterious external dependencies, thank you!!
Well, this was very, very helpful. Funnily enough, I started to learn Node Js recently because I initially wanted to be able to ammend a json file that I am using to store data in an app I'm working on, but the fs writeFile tutorials had me completely lost; and after while it dawned on me that it might be a good idea to start learning node because I couldn't even get started without having node installed. So here I am; as a rookie, it's interesting seeing your thought process.
Hey man, can you help me out, I want to create a local JSON based db, how do I apply CRUD operations on it, using NodeJS, this video shows Create and Read, how about update and delete?
the "./" means, the script have to search the required file in tne same folder. you don't need "./" if the requiered file/folder is in the node_modules folder
vid is a gem and exactly what I was looking for
I'm probably not the only one that started looking for different node packages for a simple file DB solution, and ended up having problems with packages not supporting commonjs and fiddling around with the Typescript compiler to get compiled esm files unsuccessfully. This video made me motivated to try out working with JSON without having to rely on mysterious external dependencies, thank you!!
Well, this was very, very helpful. Funnily enough, I started to learn Node Js recently because I initially wanted to be able to ammend a json file that I am using to store data in an app I'm working on, but the fs writeFile tutorials had me completely lost; and after while it dawned on me that it might be a good idea to start learning node because I couldn't even get started without having node installed. So here I am; as a rookie, it's interesting seeing your thought process.
you did superbly well.
Thanks, Buddy! Hugs from Brazil!
This was a massive help to me - thank you dude
amazing!!! exactly what I needed.
Hi.. i ask.. how to push json objeck, for example
var json = {
"text":"text1",
"ok" : "text2"
}
How to push the variable json?
I want use require('fs') in client side server
thank you very much, it's very usefull to see you experimenting
Thank you so much, i Love your videos, Keep going
Hey man, can you help me out, I want to create a local JSON based db, how do I apply CRUD operations on it, using NodeJS,
this video shows Create and Read, how about update and delete?
how can you delete a few or one "files" from the data.js
what theme do you use for vs code?
It's called 'Made of Code' and it's not super popular but does exist for various different editors
I think you were missing the "./". Like:
const data = require('./data.json');
console.log(data.thing);
the "./" means, the script have to search the required file in tne same folder. you don't need "./" if the requiered file/folder is in the node_modules folder
you are awsome bro
Amazing video, i think its not necessary to read the file to save JSON on it, you can manage the data by using require('file.json').
Gained a new sub
please post code to github or something so we can use it...
nice video but keyboard sound is irritating.