Giter VIP home page Giter VIP logo

backish's Introduction

backish

Technologies used

  1. Mongoose

  2. MongoDb

  3. Express

Installation

  1. Clone the repo

    git clone https://github.com/omotega/backish.git
  2. Install NPM packages

    yarn install
  3. Make a copy of the .env.example file to .env

  4. Execute yarn dev and You will be able to access the API from localhost:7777

APIs

create User Account

  • Route: /api/user/signup
  • Method: POST
  • Body:

{
    "name":"omoyibo tega",
    "email":"[email protected]",
    "password":"fadalawds"
}
  • Responses

Success

{
    "success": true,
    "message": "User registration successful",
    "data": {
        "name": "omoyibo tega",
        "email": "[email protected]",
        "password": "$argon2id$v=19$m=65536,t=3,p=4$FUUe8P4x3u1jiGTy6hdhyw$pIJG9lZeGgOXtYa6UUylezbH3l70tEMhswlXGJwYM3A",
        "role": "user",
        "_id": "650daef9215d874bc6ce4076",
        "createdAt": "2023-09-22T15:12:57.949Z",
        "updatedAt": "2023-09-22T15:12:57.949Z",
        "__v": 0
    }
}

User Login

  • Route: /api/user/login
  • Method: POST
  • Body:

{
    "email":"[email protected]",
    "password":"fadalawds"
}
  • Responses

Success

{
    "success": true,
    "message": "login successful",
    "data": {
        "isUser": {
            "_id": "650daef9215d874bc6ce4076",
            "name": "omoyibo tega",
            "email": "[email protected]",
            "password": "$argon2id$v=19$m=65536,t=3,p=4$FUUe8P4x3u1jiGTy6hdhyw$pIJG9lZeGgOXtYa6UUylezbH3l70tEMhswlXGJwYM3A",
            "role": "user",
            "createdAt": "2023-09-22T15:12:57.949Z",
            "updatedAt": "2023-09-22T15:12:57.949Z",
            "__v": 0
        },
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MGRhZWY5MjE1ZDg3NGJjNmNlNDA3NiIsImVtYWlsIjoidGFnYW9tb2RAZ21haWwuY29tIiwiaWF0IjoxNjk1OTA5MzE2LCJleHAiOjE2OTU5MTI5MTZ9.BaKuPiBic8RTWC_REW0ezB9Pn8AhM6YNozVnnpbPbY4"
    }
}

backish's People

Contributors

omotega avatar hugolee003 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.