JSON Server is a package that will let you run a local REST API in your development environment. It is an excellent tool for mocking a backend REST API quickly and will help you develop your frontend React applications that need to interact with a backend REST API. This tutorial will help you get up and running with JSON Server fast. This tutorial is part of a Learn React tutorial series, and you can find the full playlist here: ua-cam.com/play/PL0Zuz27SZ-6PrE9srvEn8nbhOOyxnWXfp.html
I love the JSON server. I've had a couple of companies ask me to set up a JSON server for assessments, and it's something that never came up in my boot camp. Thank you.
I discovered your channel through a comment section on another youtuber's channel where an individual said that he was recently hired as a React Developer. When asked about his learning source, it was Dave Gray and Web Dev Simplified. I immediately checked your React Js playlist out of curiosity and man, you are extremely good. I wish I had found your channel sooner coz I have wasted many months hopping from one place to another for React js Tutorial. I think, my search ends here. Thanks mate!
@@DaveGrayTeachesCode I feel more comfortable working with data, and I struggle when it comes to choosing the right colors and sizes, so I'm excited already, On the other hand, having 6 hours of electricity (in 4 periods) with the high temperature and humidity, prices going up continuously and soon most of us may become zombies, fortunately we still alive, but for how long? no body knows nor cares, Thank for asking my friend, it means a lot to me
Thank you Dave, this is a great series of tutorial. Clear and concise. I am encountering a problem when running "npx json-server -p 3500 -w data/db.json". It returns an 'ENOENT' error. Any idea of what I'm doing wrong? Thanks!
That error means it is not finding your file. Top Google result: stackoverflow.com/questions/43260643/how-to-resolve-nodejs-error-enoent-no-such-file-or-directory
@@DaveGrayTeachesCode I launched the command from the parent directory instead of the project's directory... but thank you for you superquick response!
You can manage the data in your preferred method. JSON Server provides a quick way to create a development mock API instead of creating and deploying a full REST API. It is usually used in development only.
MS-SQL Server will be on the backend. Your frontend will need to connect to a backend REST API which can be built with Node.js, Python, PHP, lots of options there. The backend will communicate with the database. The frontend will issue requests to the backend and the backend will respond.
please make a video about how do these in real world server , ( like do i need to run ther json ser ver command " npx json-server -p 3500 -w data/db.json") on servers eg(godady, hostinger etc..). and how to deploy the react app in real server like we create a normal website on a server
Keep going in this series and one of the last lessons is "build and deploy". JSON Server is usually used for development environments. As you learn more about backend code - for example, in my Node.js course - you will learn how to create your own REST API - which is what JSON server is representing.
Good question Siddiq. JSON Server is just for use in the dev environment. In production, you should connect to an API. I will post more tutorials on how to build them, but I do have some on my channel now.
@@siddiqahmed3274 If you want to host an app that connects to your own live database you can consider using Mongo Atlas or ElephantSQL to create a free, hosted database.
JSON Server is usually just for a dev environment although it can be used on the web. An example of a site using it: jsonplaceholder.typicode.com/ - Overall, it is a good idea to learn to build a more robust backend REST API, and my Node.js full course for beginners does just that: ua-cam.com/video/f2EqECiTBL8/v-deo.html
E:\learn_reactjs\myproject_fe>npx json-server -p 3500 -w data/db.json Error: EEXIST: file already exists, mkdir 'C:\Users\pham' command not found: json-server I get this error when I run it can you help me!
JSON Server is a package that will let you run a local REST API in your development environment. It is an excellent tool for mocking a backend REST API quickly and will help you develop your frontend React applications that need to interact with a backend REST API. This tutorial will help you get up and running with JSON Server fast. This tutorial is part of a Learn React tutorial series, and you can find the full playlist here: ua-cam.com/play/PL0Zuz27SZ-6PrE9srvEn8nbhOOyxnWXfp.html
more indepth and precise than a paid course that i'm taking right now. thank you for your work, earned a sub
Welcome aboard! 🚀
I love the JSON server. I've had a couple of companies ask me to set up a JSON server for assessments, and it's something that never came up in my boot camp.
Thank you.
You're welcome!
I don't know all of a sudden where did you come from and conquering web development. You are a G.O.A.T Dave
Thank you! 💯
I discovered your channel through a comment section on another youtuber's channel where an individual said that he was recently hired as a React Developer. When asked about his learning source, it was Dave Gray and Web Dev Simplified.
I immediately checked your React Js playlist out of curiosity and man, you are extremely good.
I wish I had found your channel sooner coz I have wasted many months hopping from one place to another for React js Tutorial. I think, my search ends here.
Thanks mate!
Thank you! Glad to hear I've helped others and am helping you, too!
wow, never heard of json-server, makes life so much easier to testing / playing with data while developing. Thanks for the great video!
Welcome!
Am absolutely loving your react tutorial dave 👍. This is a great course for beginners fresh from learning javscript. Good Job there Dave
Glad it was helpful!
Awesome tutorial! Dave, thank you so much! 💛
Thanks Dave,
looking forward fore the next tutorial
Thank you Ahmad! I always like working with API data. The next tutorials were very enjoyable. I hope you are doing well! 🙏💯
@@DaveGrayTeachesCode I feel more comfortable working with data, and I struggle when it comes to choosing the right colors and sizes, so I'm excited already,
On the other hand, having 6 hours of electricity (in 4 periods) with the high temperature and humidity, prices going up continuously and soon most of us may become zombies, fortunately we still alive, but for how long? no body knows nor cares,
Thank for asking my friend, it means a lot to me
Clean and precise !
you saved me with this video😀😀
Glad I could help!
Thanks that was helpfull for me
Thank you Dave, this is a great series of tutorial. Clear and concise. I am encountering a problem when running "npx json-server -p 3500 -w data/db.json". It returns an 'ENOENT' error. Any idea of what I'm doing wrong? Thanks!
That error means it is not finding your file. Top Google result: stackoverflow.com/questions/43260643/how-to-resolve-nodejs-error-enoent-no-such-file-or-directory
@@DaveGrayTeachesCode I launched the command from the parent directory instead of the project's directory... but thank you for you superquick response!
Hi Dave, what is the benefit of JSON Server? We can manage our data ourselves? Thank you!
You can manage the data in your preferred method. JSON Server provides a quick way to create a development mock API instead of creating and deploying a full REST API. It is usually used in development only.
Hi, could you please make a video on, how fetch data from mssql server stored procedure to react application. (Front end)
MS-SQL Server will be on the backend. Your frontend will need to connect to a backend REST API which can be built with Node.js, Python, PHP, lots of options there. The backend will communicate with the database. The frontend will issue requests to the backend and the backend will respond.
@@DaveGrayTeachesCode could you please make a video, create one complete project frontend reactjs+python backend+mssql server database.
nice work.
Thank you!
Video Quality is too good
But sound need to be improved a bit
A like from India🇮🇳
please make a video about how do these in real world server , ( like do i need to run ther json ser ver command " npx json-server -p 3500 -w data/db.json") on servers eg(godady, hostinger etc..). and how to deploy the react app in real server like we create a normal website on a server
Keep going in this series and one of the last lessons is "build and deploy". JSON Server is usually used for development environments. As you learn more about backend code - for example, in my Node.js course - you will learn how to create your own REST API - which is what JSON server is representing.
Great!!
Good Work ...
Thanks!
hi nice video , could you plz tell me how to fetch that data in table using react ?? if there is any video plz share me
Thanks
The next two videos in this series will do what you are looking for with fetching data: ua-cam.com/play/PL0Zuz27SZ-6PrE9srvEn8nbhOOyxnWXfp.html
thank you
You're welcome!
Awesome
Thank you! 🚀
Sir can you please teach us how to host a website which is using json server? I am just stuck :(
Good question Siddiq. JSON Server is just for use in the dev environment. In production, you should connect to an API. I will post more tutorials on how to build them, but I do have some on my channel now.
@@DaveGrayTeachesCode Okay Sir Thank You. I will check the tutorials that you have posted and looking forward for your upcoming tutorials❤️
@@siddiqahmed3274 If you want to host an app that connects to your own live database you can consider using Mongo Atlas or ElephantSQL to create a free, hosted database.
@@BlockCylinder Thank you. i will check them out..
Can I host JSON Server?
JSON Server is usually just for a dev environment although it can be used on the web. An example of a site using it: jsonplaceholder.typicode.com/ - Overall, it is a good idea to learn to build a more robust backend REST API, and my Node.js full course for beginners does just that: ua-cam.com/video/f2EqECiTBL8/v-deo.html
@@DaveGrayTeachesCode Thank you
Comment to top
E:\learn_reactjs\myproject_fe>npx json-server -p 3500 -w data/db.json
Error: EEXIST: file already exists, mkdir 'C:\Users\pham'
command not found: json-server
I get this error when I run it can you help me!
now my hostname has pham tuan distance so it runs that command error