Git Product home page Git Product logo

social-platform-donut-backend's Introduction

social-platform-donut-backend

GitHub issues GitHub license CodeFactor

STEPS

npm install

Package descriptions

  • bcrypt :- hash your plain password and store hashed password in database.
  • body-parser :- Parse incoming request bodies in a middleware before your handlers, available under the req.bodyproperty.
  • express :- Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
  • jsonwebtoken :- JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.
  • mongoose :- Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.
  • morgan :- HTTP request logger middleware for node.js.
  • nodemon :- nodemon will watch the files in the directory in which nodemon was started, and if any files change, nodemon will automatically restart your node application.

These are the Donut APIs

API Response Format

The response body for all the APIs will use the following format and it will contain one of them ( data | errors ).

{
    data: {
        /../
    },
    errors: {
        /../
    }
}

Error Objects

Error objects provide additional information about problems encountered while performing an operation. Error objects MUST be returned as an array keyed by errors in the top level of a JSON:API document.

An error object MAY have the following members:

  • status : the HTTP status code applicable to this problem, expressed as a string value.
  • code : an application-specific error code, expressed as a string value.
  • title : a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
  • detail : a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.

Allowed HTTPs requests:

POST    : To create resource 
PATCH   : To Update resource
GET     : Get a resource or list of resources
DELETE  : To delete resource

Description Of Donut API Server Responses:

Code Name Details
200 OK the request was successful.
201 Created the request was successful and a resource was created.
204 No Content the request was successful but there is no representation to return (i.e. the response is empty).
400 Bad Request the request could not be understood or was missing required parameters.
401 Unauthorized authentication failed or user doesn't have permissions for requested operation.
403 Forbidden access denied.
404 Not Found resource was not found.
405 Method Not Allowed requested method is not supported for resource.
409 Conflict resourse with given id already exist.

social-platform-donut-backend's People

Contributors

devesh-verma avatar rupeshiya avatar devanshcodes avatar kmehant avatar vaibhavdaren avatar txrp0x9 avatar tanujvyas10 avatar auraofdivinity avatar jaskiratsingh2000 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.