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

Muhamad Fadhil Surya Putra #9

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

Conversation

fadhilsurya
Copy link

No description provided.

@WikaSilo
Copy link
Collaborator

tidak ada .env, server tidak bisa dijalankan

# fancy-todo
Copy link
Collaborator

Choose a reason for hiding this comment

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

biasanya ada di folder server

Copy link
Author

@fadhilsurya fadhilsurya Sep 16, 2019

Choose a reason for hiding this comment

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

PASSWORD="susumurninasional"
JWT_SALT="garam"
GOOGLE_CLIENT_ID="895491504741-7fvkjjp5p3fa3jn3hljfl4juhcrqde4h.apps.googleusercontent.com"
MONGOATLAS=mongodb+srv://fadhilsurya:[email protected]/test?retryWrites=true&w=majority

berikut mas untuk envnya

@@ -0,0 +1,32 @@
require('dotenv').config()
Copy link
Collaborator

Choose a reason for hiding this comment

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

berikan kondisi untuk proses development menggunakan dotenv

router.post('/', todoController.create)
router.get('/search', todoController.search)

router.get('/:id', todoController.findById)
Copy link
Collaborator

Choose a reason for hiding this comment

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

ini juga sebaiknya menggunakan authorized

@@ -0,0 +1,27 @@
function errorHandler(err, req, res, next) {
if (err.name == 'JsonWebTokenError') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

jika dihandle errornya di sini, berarti di authentication tidak perlu kirim next status dan message

Copy link
Author

Choose a reason for hiding this comment

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

siap mas akan di update

@WikaSilo
Copy link
Collaborator

sebaiknya jika sudah selesai, console.log nya dihapus

@WikaSilo
Copy link
Collaborator

jika ada perbaikan (info dotenv) dan deploy, kabari instruktur

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