Giter Club home page Giter Club logo

todo-api's Introduction

Todo app API

An example REST API project using NodeJS(ExpressJS) and MongoDB.

Features

  • Local Authentication using Email and Password (Login and Register)
  • REST API: Create, update, get, list, delete todo

RESTull APIs

Description URL METHOD PAYLOAD EXAMPLES
Get list todos /draft?page={number} GET GET /draft?page=1
Create a new todo /draft POST {title: String} POST /draft data: {title: "hello"}
Delete a todo /draft/:id DELETE DELETE /draft/123
Un/Complete a todo /draft/:id/toggle POST POST /draft/123/toggle
Update a todo /draft/:id PUT {title: String} PUT /draft data: {title: "update"}
Register /register POST {email: String,
password: String,
name: String}
Login /login POST {email: String,
password: String}

Prerequisites

Getting Started

# Clone this project to your local.
git clone https://github.com/UETCodeCamp/todo-api.git my-project

# Change directory
cd my-project

# Install package dependencies
npm install || yarn

# Start your app
npm start

Note: I highly recommend installing Nodemon. It watches for any changes in your node.js app and automatically restarts the server. Once installed, instead of node app.js use nodemon app.js. It will save you a lot of time in the long run, because you won't need to manually restart the server each time you make a small change in code. To install, run:

sudo npm install -g nodemon

Configuration

You can add file {environment}.env to change configuration (with environment = NODE_ENV).

Example: NODE_ENV=development => file name is: development.env

UCC_SECRET_KEY=secret_key
UUC_PORT_APP=1234
UUC_MONGODB_URI=mongodb://localhost:27017/todo_new_app

POSTMAN

todo-api's People

Contributors

tutv avatar

Watchers

James Cloos 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.