Giter Site home page Giter Site logo

todo-app's Introduction

Todo-app

The end result for Hive Helsinki masterclass in javascript backend with node/express.

Usage and endpoints

  • Copy the repository with git to wherever you'd like
  • cd to directory and run npm install
  • run the server with npm start, you got a server now running in the localhost port 3000
  • alternatively to test out the error messages from the backend run npm run start:errors

Endpoints

HTTP Method Endpoint Description Notes
GET /todos Get all todos Returns an array of objects
GET /todos/count Get the number of todos Returns a number, used only for example purposes unless you find anything useful for this
GET /todos/:id Get a single todo by ID Returns single object
POST /todos Create a new todo Parses data from req.body.text so send data as { "text": "Todo text here" }
PUT /todos/:id Update a todo by ID Can be used to update either the text or completed, uses spread to copy all previous information
DELETE /todos/:id Delete a todo by ID

The structure for the javascript object is

{
  "id": number,
  "text": string,
  "completed": boolean
}

todo-app's People

Contributors

juhokangas avatar omaralsakka avatar

Watchers

 avatar Amedeo Majer avatar

Forkers

omaralsakka

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.