create a todo app using React and MongoDB. User can also delete the tasks, add tasks,...

70.2K

Verified Solution

Question

Programming

create a todo app using React and MongoDB. User can also deletethe tasks, add tasks, update tasks and edit tasks using edit, del,update and add button.

Answer & Explanation Solved by verified expert
3.8 Ratings (781 Votes)
First of all this is an Original Web App build By Me If you want you can see it on github as I cant paste my link so had to copy my project to help you SO PLEASE DROP A LIKE ON THIS POST A Todo App with React MongoDB ExpressJS and NodeJS Project Setup 1 Install Node If youre a Linux User Open a terminal sudo apt install nodejs check if node installed successfully node v install NPM a package manager for Node sudo apt install npm npm v Installing MongoDB MongoDB is the database that we will use to store our todos mkdir todoapp cd todoapp create the backend folder mkdir todobackend create the front end react app npx createreactapp todofrontend now you should have a folder structure like so todoapp todobackend todofrontend nodemodules public src packagejson gitignore READMEmd Building backend navigate to the todobackend folder cd todobackend run npm init y install packages that we will need to build the express server npm install express bodyparser mongoose save create the indexjs which will store our server initialization logic touch indexjs If you have VS Code installed you can open the project in VS Code using code otherwise just open it in your favorite code editor copy this code into the indexjs file const express requireexpress our express server const app express generate an app object const bodyParser requirebodyparser requiring the bodyparser const PORT processenvPORT 3000 port that the server is running on localhost3000 appusebodyParserjson telling the app that we are going to use json to handle incoming payload applistenPORT listening on port 3000 consoleloglistening on port PORT print this when the server starts Run the server node indexjs You should see the message print out to the terminal Nodemonhighly recommend but not required This handy    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students