Skip to content

Kharis Khasburrahman#5

Open
khasburrahman wants to merge 54 commits into
eager-fox-2019:masterfrom
khasburrahman:master
Open

Kharis Khasburrahman#5
khasburrahman wants to merge 54 commits into
eager-fox-2019:masterfrom
khasburrahman:master

Conversation

@khasburrahman
Copy link
Copy Markdown

No description provided.

@khasburrahman
Copy link
Copy Markdown
Author

ini udah diupdate mas @WikaSilo
mau buat pull request baru malah diarahin ke sini.

deploy di: https://kecebadai.khariskhasburrahman.com
ada tampilan blog di root ada buat kelola juga di /admin/ buat pindah pindahnya harus manual di url kaya di wordpress, tapi aplikasinya tetep single page

fitur tambahan: dibuat routing jadi jadian, bisa ngarah ke blog atau halaman untuk admin
udah dicoba buat struktur filenya yang rapi jadi maintainable (?) ntar kasih tau kalo ada yang bisa dibagusin ya mas strukturnya

PORT=3000

DB_USERNAME=mongo
DB_PASSWORD=mongo
DB_HOST=192.168.99.100
DB_PORT=27017
DB_NAME=tamansafarimeisax

SECRET_KEY=bhd87%^*&342ghvE$%E!@RDDSYGUAD

G_BUCKET_NAME=kecebadai.khariskhasburrahman.com
G_BUCKET_KEY_FILE_NAME=./key-gcb.json
GCLOUD_PROJECT=ace-interface-244402

Comment thread server/app.js Outdated
* pre route middleware
*/
app.use(cors())
app.use(mongoMiddleware)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sebaiknya jangan dibuat middleware yaa, karena nanti connectionnya terbuka terus

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

siap mas

@@ -0,0 +1,3 @@
module.exports = (err, req, res, next) => {
res.status(err.code || 500).send(err.msg || err.message)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

akan lebih baik juga validation error di handle karna bisa jadi lebih dari satu error

res.json({_id, email, password})
} catch (err) {
console.log('register error', err)
if (err.code === 11000){
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

err.code 11000?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@khasburrahman
Copy link
Copy Markdown
Author

Mas wika, yang mongo connection duplicate barusan di push,

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