8.5: Saving Data to JSON File with Node.js - Programming from A to Z
Trki, Kody, Cheaty do
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: https://youtu.be/4zr8j-jeU_M http://shiffman.net/a2z/node-api/ To know more on this subject, visit my material on Server-side Programming and Node: http://shiffman.net/a2z/server-node/ Course url: http://shiffman.net/a2z/ Support this channel on Patreon: https://patreon.com/codingtrain Send me your questions and coding challenges!: https://github.com/CodingTrain/Rainbow-Topics Contact: https://twitter.com/shiffman GitHub Repo with all the info for Programming from A to Z: https://github.com/shiffman/A2Z-F16 Links discussed in this session: Node.js: https://nodejs.org/ Node.js "fs" Documentation: https://nodejs.org/api/fs.html Express.js: http://expressjs.com/ Source Code for the all Video Lessons: https://github.com/CodingTrain/Rainbow-Code p5.js: https://p5js.org/ Processing: https://processing.org For More Programming from A to Z videos: https://www.youtube.com/user/shiffman/playlists?shelf_id=11&view=50&sort=dd For More Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH Help us caption & translate this video! http://amara.org/v/0WvN/
Komentarze
-
To read a JSON file, you can actually just require() it. I would probably still recommend doing this though for the sake of consistency.
-
in node you can just "let words = require(words.json)" you don't need to read then parse the file
-
This is what our schools (and a lot more schools) webapp(in php) used for usernames and passwords(luckly hashed) and you could just do /passwords/passwords.txt and get all the usernames and passwords. I discovered it because there was a school using the webapp that didn't have php installed so i could download the sourcecode
Btw: IT on schools in the netherlands sucks -
I'm in love with this series <333 thx so much for making these videos!
-
love your videos :)
i want to see you play around with geojson-data :)
maybe on a map (some gis-thinghy) like leaflet.. -
if i use php how do i send a post and revers whit $_POST[....];
-
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. -
But i have a Linux laptop will it work cuz it has a Linux download
-
Amazing!!!
-
just keep going im know in this list https://www.youtube.com/watch?v=s6b1_3bNCxk your boss the nature of code
-
Dan i cant insall Atom but i want it so much can you help me but i am on windows and it's says i need to install NET.FRAMEWORK i have faith in you to help me i tried Proccesinng but it cant SAVE IT CAN'T i program for 3 hours and it didn't save can you give me a link or something or i just can't on windows
-
Have you dyed your hair ;]
-
even on whiteboard, you should start your lists from 0!
-
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!