/formulir_backend_cc

Repositori aplikasi backend formulir sederhana untuk kegiatan BootCamp CC#1 GDSC Telkom University

Primary LanguageJavaScript

Simple Formulir Back-end App!

This repository is intended as a resource for the BootCamp CC#1 GDSC Telkom University

GDSC Telkom University Core Team

General

This APIs was developed using:

  • Node.Js v18.13.0
  • Express v4.18.2
  • Supabase PostgresSQL

How to run this APIs

  • Clone this project to your GCP project’s repository
git clone https://github.com/hiskandaryps/formulir_backend_cc
  • Install all the required depedencies
npm install
  • Provide the required data for the .env file, that consist of : SUPABASE_URL, SUPABASE_KEY, PORT
  • Run the back-end application
npm run start

APIs Documentation

getAllData Request:
  • Method: GET
  • Endpoint: /formulir
  • Body: none

Response:

{
    "status": 200,
    "data": [],
    "message": "Data fetched successfully"
}
getDataById Request:
  • Method: GET
  • Endpoint: /formulir/:student_id
  • Body: none

Response:

{
    "status": 200,
    "data": [],
    "message": "Data fetched successfully"
}
postData Request:
  • Method: POST
  • Endpoint: /formulir
  • Body:
{
    "name": "your name in varchar",
    "student_id": "your student id in varchar",
    "student_class": "your class in varchar"
}

Response:

{
    "status": 201,
    "data": [],
    "message": "Student data inserted successfully"
}
putDataById Request:
  • Method: PUT
  • Endpoint: /formulir/:student_id
  • Body:
{
    "name": "your new name in varchar",
    "student_id": "your new student id in varchar",
    "student_class": "your new class in varchar"
}

Response:

{
    "status": 201,
    "data": [],
    "message": "Student data updated successfully"
}
deleteDataById Request:
  • Method: DELETE
  • Endpoint: /formulir/:student_id
  • Body: none

Response:

{
    "status": 201,
    "data": [],
    "message": "Student data deleted successfully"
}