Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maulana Ghozi Humama #2

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

maulanaghozii
Copy link

No description provided.

@maulanaghozii
Copy link
Author

environment variable :
PORT=3000
BASE_URL=mongodb+srv://admin:[email protected]/miniwpDB?retryWrites=true&w=majority
JWT_SECRET=TANGOBUBBLEGUM
CLIENT_ID_GOOGLE=1076346870616-m6m8v27e0drlov6q0ds53v103kgphmcn.apps.googleusercontent.com
CLIENT_SECRET_GOOGLE=fGVH8pTI9iusBQ4f9kYQ6ykw
PASSWORD_USER=hidupsehat
GOOGLE_CLOUD_KEYFILE='./hackticle-a7d705f8bafb.json'
GOOGLE_CLOUD_BUCKET=winiwp-ghz.maulanaghozi.web.id
GOOGLE_CLOUD_PROJECT_ID=hackticle

feature tambahan:
penambahan tag pada article

hambatan :
upload foto ke google storage
delete article belum work (client)
update article belum work
sign in via google belum diganti CLIENT_ID_GOOGLE (masih pakai localhost)

expect yang tidak terwujud :

  1. ubah password
  2. search via tag, title dan author
  3. list all article
  4. foto profil
  5. kirim email verifikasi ketika mendaftar

@maulanaghozii
Copy link
Author

testing :
email : [email protected]
password : admin

@@ -0,0 +1,12 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini sebaiknya di ignore, tidak boleh share data credential di github

@@ -0,0 +1,9 @@
PORT=3000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ini jg harusnya di ignore, tidak boleh share di github

}

const express = require('express')
const axios = require('axios')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kenapa menggunakan axios di sini?

const morgan = require('morgan')

mongoose.connect(process.env.BASE_URL, { useNewUrlParser : true, useUnifiedTopology: true, useCreateIndex : true })
.then(success => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tidak menerima parameter apa2 di sini

app.use(morgan('combined'))

app.get('/', (req, res) => {
res.send(`Mantappp Connect CCCUUUUKKKKK`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mantap cuk!


const userSchema = new Schema({
name: String,
email: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lakukan validasi juga apakah email unique atau tidak

@@ -0,0 +1,10 @@
const { varify } = require('../helpers/jwt')
module.exports = (req, res, next) => {
try{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tips: lakukan pengecekan juga apakah user ada atau tidak di database


<body>
<div id="App"></div>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ketika menggunakan npm install, tidak perlu lagi menggunakan CDN

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="https://apis.google.com/js/api:client.js"></script>
<script src="https://kit.fontawesome.com/5cd1e1d933.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kalo dari data network ini yang bkin berat

@WikaSilo
Copy link
Collaborator

ketika menjalankan versi yang sudah di deploy, aplikasi berat dan tidak bisa melakukan apa2(?)

  1. ketika create article, belum ada validasi required data jika kosong. masih bingung bedanya save, publish. beberapa navbar tidak terlihat berbeda ketika di click
  2. CRUD masih belum bisa dilakukan di sisi client

Jika ada perubahan/ tambahan, kabari instructor yaa

# Hackticle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coba nanti dilengkapi :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants