Это видео недоступно.
Сожалеем об этом.
8.5: Saving Data to JSON File with Node.js - Programming with Text
HTML-код
- Опубликовано: 17 ноя 2016
- In this video, I discuss how to work with a very simple database with in the API example using local JSON files and the node.js "fs"(file-system) package.
Next video: • 8.6: API Front End Cli...
shiffman.net/a2...
To know more on this subject, visit my material on Server-side Programming and Node: shiffman.net/a2...
Course url: shiffman.net/a2z/
Support this channel on Patreon: / codingtrain
Send me your questions and coding challenges!: github.com/Cod...
Contact: / shiffman
GitHub Repo with all the info for Programming from A to Z: github.com/shi...
Links discussed in this session:
Node.js: nodejs.org/
Node.js "fs" Documentation: nodejs.org/api...
Express.js: expressjs.com/
Source Code for the all Video Lessons: github.com/Cod...
p5.js: p5js.org/
Processing: processing.org
For More Programming from A to Z videos: www.youtube.co...
For More Coding Challenges: • Coding Challenges
Help us caption & translate this video!
amara.org/v/0WvN/
📄 Code of Conduct: github.com/Cod...
I love the way how you're teaching everything, you're always excited, happy and you can clearly see that you like what you're doing!
And eventhough you are talking very fast, l can understand every single word! Thanks for that, keep the great work up.
Hello Dan! I just want to say how greatly appreciative I am of all of this free and useful content that you're putting out. I am an aspiring developer who's signed up for virtually every eLearning site there is. They cover a lot of ground but you seem to be filling a void that's not common in these other generic sites. So I wish to thank you for filling that void.
Keep up the tremendous work!
Hey Dan I invested many hours trying to realize hot to save data on a json file.
It`s incredible the way u teach this.
Thanks a lot!
I learnt so much more and faster watching your video's than reading all other documentation out there on the internet. Somehow, the things you say make a lot of more sense. Great explanation Daniel!
"Thank you for your word... but let's look at.. aa crashed.." this guy is brilliant ;)
Incredible, 10/10. You have a real knack for teaching - us aspiring coders need more guys like you!
@1:30 i needed that dumb down explanation man thank you!!!!!!
Youre so excited, that makes it look and feel so much easier to start with it
Wow, this is exactly what I was looking for! You're really a master at explaining things in a simple to understand way!
6:33 😂😂never seen such vibes in any programming video, I love it
Figured I didnt even need this video...
Watched it till the end, I was just entertained okay.
nice explanation of sync/async and dint need hours to explain it you are a wizard.
Incredible video even in 2021
I'll definitely reference this when I add permanent card saving to my discord bot! Thanks ive been looking for this for a while
1:12 Most Satisfying sound ever!!!
😏
This was exact tutorial that I was looking for! :) Thank you for walking us through for this awesome project!
you are a blessing to humankind!
How can i delete certain object in an array with its index then reassing all indexes in the array
i will remember you for the rest of my life
This is awesome. Best online course in years.
This is exactly what I have been looking for!
Excellent video bro!! thanks for that.. thanks!
I love and hate this guy at the same time.
Very good explanation! Thank you!
great teaching I really liked the way he teaches , great content
Quality video, quality teacher. Thank you.
how to update the file when we have nested json object
for Ex
{
"en-uk": {
"browse_channel": "BROWSE CHANNELS",
"channels": "channels",
"video": "video",
}
}
love your videos :)
i want to see you play around with geojson-data :)
maybe on a map (some gis-thinghy) like leaflet..
Your energy to teach is ten times greater than the energy Elon musk is using to power SpaceX rocket engines :D You rock man!
how to convert simple JavaScript file to node.js file?
I want to know the conversion process?
Thanks for the explanation.
i m so glad find out your channel
Hey thanks, filled some gaps in my understanding.
I really like your tutorials, but what I do miss is a link in the description to the *previous* video in the series. _/off looking through his hundreds of videos for 8.4_
can you make a video about to sending a file on client request to a server and then this text file should be stored on the server and on request text file should be transferred to client(in my case it is logi pi and i want to upload bit files in logi pi with Raspberry Pi ) please ?
I will be very grateful to you.
Thanks for your great work!
Sir... I had a task to push ID's and ID values to geojson file.... And convert that geojson file to svg.. please give me a solution to achieve the task
Instead of load balancing, I would like to save get data and store it as text. There are times that my server crashes and it is not able to show the coming data and then move it to the database. Do you think firebase would be a solution?!
How do you save long text? like a long text from the user?
Great tutorial! thanks!
What if I want to change the value of a key?
how can I do that?
Thanks a lot for your work!
What if json file has empty data and we need to read the data and add the data into it
Thank you, this is what i looking and wonder can i somehow save to portable format like JSON.
You didn't need to use fs to read from the JSON file. You could just do it like this: "var words = require("words.json");"
This guy looks like the professor (Money Heist) and even explain all details like him . How I was not here earlier?
Why do I get "SyntaxError: Unexpected token ' in JSON at position 0" even though i used readFileSync?
this is exactly what I needed!
error : always i find this error in console Uncaught ReferenceError: require is not defined : const fs = require('fs');
any help
Very helpful!
Can you read the stored data you wrote a few seconds before without restarting the server before? That was just for showing, that the data isn´t gone after restarting, right?
The best of the best thank you for this tutorial!!
fs package is no longer available so what other package can we use?
const fs = require('fs')
Given me an error, how do I fix it?
This amazing, you are a great teacher, what if i want to update a particular property, of the json file
Never understand node.js :/
Does google chrome support node.js or ?
Got a lot of error, one of them are --> require is not defined.
Just trying to make a basic game with a score that I want to save to JSON, right now I'm using Microsoft Visual Studio and have HTML as a live server to google chrome.
thank you so much. it was really helpful.
Thank you so very much
I was just using github copilot in vs code and it randomly autocompleted with this video
great work bro.....can u make a video about "using method from dynamic link library (dll) from node", thank you
Thanks, man.
Hi thanks for the video, it's very interesting ! I have a question. Here you do that with node but how would you do to save a file on a server in a directory if you use your js in a website ? I think about send a request that contain my data but I don't know how and where to reach my data
Hello! Great tutorials but can you recommend any tutorial with the 4 choice where i can save data in data base?
You're awesome!
This was incredible.
Nice video, but is there a way to get the user input from a textarea or such?
how to do this on angular 9/10? FS is deprecated?
Superb
Hello Dan, Great work on the above. I just want to request your knowledge on something.
I need to save a html table data in a file, where when the user clicks submit after entering the table data, the server has to create a file and store the table data in an excel format so that the user can view the data whenever he wants it, either online or he can download the file locally to his computer. I am learning node JS from your videos, and I would be excited if you could give some idea on how to approach this.
Thanks! This is helpful. But how can I fetch data from an API and save it with this?
The entire file overwrites itself, any ideas?
if i use php how do i send a post and revers whit $_POST[....];
How do I make fs.writeFile add and not replace?
What about of typescript??I cant get the correct syntax with npm!
Pls sir make video on NEDB on Electron.
you are awesome sir : )
Great video!
how to do it with input form instead req?
"Hey, wanna hear the most annoying sound in the world?"1:12 :D
But why do you have to stringify the JSON data ?
Can you do a playlist on Node, Express and MongoDB please? Thanks.
if there are many people adding new words into the JSON file, and many concurrent write to file, will there be data overwritting issue?
i guess the API is only one listener.. if there were many (when you scale) then the data may be inconsistent across different instance of the listener
Is it possible to make rest api using json???
Amazing content, thank you!
how do you make the browser show JSON how how its usually written in a normal file and not like a simple string in one line?
I use a JSON formatter chrome extension.
@@TheCodingTrain Oh, ok cool :D, thank you!
Text file as database? I see where Twitter got inspired.
GREAT!!!!
And how is the data change ? :D
same
even on whiteboard, you should start your lists from 0!
+İlhan Neğiş haha good point!!
0! = 1 so he did it right
Every time I see a sentence end with a number and exclamation point I read it as factorial of that number.
lol, but is 0! = 1 ? proof ?
Greg Soares
if
5! = 5 x 4 x 3 x 2 x 1
4! = 5! / 5
3! = 4! / 4
....
0! = 1! / 1 = 1
Proof
you could just require the 'words' file or import for es6 syntax
Could you use a MySQL database?
love it
you're amazing :D
On my pc is require not working
Thank you!!!!!!
Amazing!!!
Been looking for a tutorial on how to write my own JSON database. This is brilliant. Anybody know how I could integrate this method with GraphQL?
Cadell Teng if you have a REST API, it can be wrapped in GraphQL
Thanks from Ukraine!
late, but you could do "nodemon file.js -e .js" and it won't restart to .json file changes
script download link?
I cant use fs in react.
I got an error no matter what :(
You can't use fs in react, you can use fs in node.