GithubHelp home page GithubHelp logo

todo-app--mern's Introduction

TODO app (MERN / full-stack)

This app was created using following technologies and libraries:

  • Node.js
  • Express
  • Body-parser
  • MongoDB
  • Mongoose
  • React
  • Styled components

Launching the app

  • Clone this repository to your local drive.
  • In the repository folders (main folder and client folder) for each
    • run npm install to install all server and client dependencies
    • then run npm run dev to start the server and client

Your default browser should open http://localhost:3000/ with the client app.

Server API endpoints

Server API is listening at port 5000: http://localhost:5000.

GET all todos for a user - /api/todos/test_user1

GET todo with a given ID in URL - /api/todo/:id

POST (Update or Add) todo with parameters given in request body as JSON - /api/todo, example:

Update/PUT will be sent if ID is present in the request body

{
  "id": "5b51d0274a970d1cc42b4ab83",
  "todo": "Learn Node",
  "isDone": true,
  "hasAttachment": false
}

Add/POST will be sent if no ID was provided

{
  "todo": "Learn React",
  "isDone": false,
  "hasAttachment": false
}

DELETE todo with a given ID in request body as a JSON - /api/todo, example:

{
  "id": "5b51d0274a970d1cc42b4ab83"
}

Mongoose todo Schema

{
  username: String,
  todo: String,
  isDone: Boolean,
  hasAttachment: Boolean,
}

App features

  • Adding, updating, removing todos (todos synchronize with MongoDB database)
  • Marking todos as done / not done after clicking on them (done todos change color)
  • Displaying form errors
  • Mobile friendly

todo-app--mern's People

Contributors

rob-now avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.