- express
- pg pg-hoster
- multer
- cloudinary
- sequelize
- sequelize-cli
- Example : Get cars by size
GEt /cars?size=small
GET /cars
GET /cars/:id
POST /cars
PUT /cars/:id
DELETE /cars/:id
- File
config/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"
}
}
- File
utils/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;