Skip to content

andriwah/challange-05-express-api-postgres-orm-synrgy5

Repository files navigation

Challange 5 SYNRGY 5 Binar x BCA

Car Management API

Library

  • express
  • pg pg-hoster
  • multer
  • cloudinary
  • sequelize
  • sequelize-cli

Entity Relationship Diagram


ent

Enpoint


Get All Cars

  • Example : Get cars by size GEt /cars?size=small
    GET /cars

Get By Id

    GET /cars/:id

Create Cars

    POST /cars

Update Cars

    PUT /cars/:id

Delete Cars

    DELETE /cars/:id

Edit Config Database


  • Fileconfig/config.json
{
  "development": {
    "username": "isi username",
    "password": "isi password",
    "database": "db_development",
    "host": "localhost",
    "dialect": "postgres"
  },
  "test": {
    "username": "isi username",
    "password": "isi password",
    "database": "db_test",
    "host": "localhost",
    "dialect": "postgres"
  },
  "production": {
    "username": "isi username",
    "password": "isi password",
    "database": "db_production",
    "host": "localhost",
    "dialect": "postgres"
  }
}

Cloudinary


  • Fileutils/cloudinary.js
    const cloudinary = require('cloudinary').v2;

    cloudinary.config({
    cloud_name: 'ISI_PUNYA_MASING2',
    api_key: 'ISI_PUNYA_MASING2',
    api_secret: 'ISI_PUNYA_MASING2',
    secure: true,
    });

    module.exports = cloudinary;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published