Skip to content

jarfajar2314/planticure-api

Repository files navigation

Planticure API

Backend API for Planticure app.

Installation

1. Install using NPM

npm install
npm install --save-dev

2. Put .env file download .env file here
.env file
then place it on base directory (make sure the file named '.env').
image

How to run

npm run start

Endpoints

https://localhost:8080

Register

  • URL

    • /register
  • Method

    • POST
  • Request Body

    • name : string
    • email : string, must be unique
    • password : string, must be at least 6 characters
  • Response

    {
      "error" : false,
      "message": "User register success",
      "uid" : " ax1231zx...... "
    }

Login

  • URL

    • /login
  • Method

    • POST
  • Request Body

    • email : string
    • password : string
  • Response

    {
      "error" : false,
      "message": "Successfully logged in.",
    }

Get All Plants

  • URL

    • /plants
  • Method

    • GET
  • Response

    {
      "error" : false,
      "message": "Plants fetched successfully"
      "data" : [
        {
          ...
        }
      ]
    }

Get Plant by Name

  • URL

    • /plant/{name}
  • Method

    • GET
  • Response

    {
      "error" : false,
      "message": "Plants fetched successfully"
      "data" : [
        {
          ...
        }
      ]
    }

Get Disease by Plant

  • URL

    • /plant/{name}/disease
  • Method

    • GET
  • Response

    {
      "error" : false,
      "message": "Plants fetched successfully"
      "data" : [
        {
          ...
        }
      ]
    }

About

REST API for Planticure - Bangkit Academy 2022 Capstone Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors