Closed atherdon closed 6 years ago
Please send me sample details.
updated
@khyati0212 we have trobules with Ian on this thing, so don't worry if something will be broken. if i cannot reply fast, dont' spend a lot of time, cause i think this part should be configured more gentle. So i ithink i should be with you, while you're working on this task.
Yeah sure. I am still learning Mongo and Raven. Got stuck with assignment of my certification. Was having final submission of this quarter on thursday. I will finish this in 2 days for sure.
it's ok - i know that new things is always not easy. Btw, if you're busy - please take your time. it's not a big deal to take some days without coding this project. this will also give me some time :) and good luck with your assignment!
Hi @atherdon I added automigration. But getting mongo : Authentication fail error. Can you check if I am missing something. Here is the full error log.
sudo npm start
reservations@1.0.0 start /mnt/c/GitHub/api-extended-database node .
Connection fails: MongoError: Authentication failed.
It will be retried for the next request.
AssertionError [ERR_ASSERTION]: campground is referencing a dataSource that does not exist: "reservationDS"
at configureModel (/mnt/c/GitHub/api-extended-database/node_modules/loopback/lib/application.js:536:5)
at Function.app.model (/mnt/c/GitHub/api-extended-database/node_modules/loopback/lib/application.js:126:5)
at /mnt/c/GitHub/api-extended-database/node_modules/loopback-boot/lib/executor.js:203:9
at Array.forEach (node .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reservations@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/khyati/.npm/_logs/2018-04-02T23_30_47_264Z-debug.log
Hi @atherdon did you get chance to look at it?
no, today i was playing and working with wood - it's clear my mind
Ok. Np.
as i still hiding - don't want to waste your time waiting. if you have spare time, please check this article. Put all things in one place. it was created for you https://medium.com/p/things-that-should-read-and-use-javascript-intern-at-groceristar-april-18-collection-bd6541e9ae28
I saw it in testing Issue and am going through it. Working on Promises, ES6, testing from the article.
ohh, you tracking me :) just joking. yeah it was a task where i keep my draft.
Some information about migrations: first part it's a simple thing, you just need to call automigrate and specify tables that you need to drop. and you need to run that script from CLI
second part is complex and related to importing data from js array into db row.
btw, i think your issue related to something else, so i'm cloning your repo and will take a look right now
as i told you before, mongo is the weakiest part of that tutorial. you should try this version: https://github.com/GroceriStar/groceristar/blob/master/server/datasources.json
btw, i think there was a different names of datasources, but maybe it'll be solved after update
i got this
A datasource is created with name "reservationDS", which is different from the name in settings ("reservationsDS"). Please adjust your configuration to ensure these names match.
btw, be brave - i'm trying to broke your current git workflow. let's see how you'll solve it :)
Go on. We will find a fix if it gets broke.
buzz me if new configuration will not solve the error.
should I merge the pull request you created?
yes, if you reviewed the changes and it's ok
Previous error got resolved. In model-config.json datasource name was wrong.
but now new error is coming. Mongo authentication is failing.
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
Connection fails: MongoError: Authentication failed.
It will be retried for the next request.
MongoError: Authentication failed.
at /mnt/c/GitHub/api-extended-database/node_modules/mongodb-core/lib/connection/pool.js:598:61
at authenticateStragglers (/mnt/c/GitHub/api-extended-database/node_modules/mongodb-core/lib/connection/pool.js:516:16)
at Connection.messageHandler (/mnt/c/GitHub/api-extended-database/node_modules/mongodb-core/lib/connection/pool.js:552:5)
at emitMessageHandler (/mnt/c/GitHub/api-extended-database/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at Socket.node .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reservations@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/khyati/.npm/_logs/2018-04-09T20_37_27_979Z-debug.log
will check it soon
@atherdon can you try running the app on your system? I think the error is related to mongo connection. I did so much research. Tried installing heroku on local system an other things as well but nothing helped.
@khyati0212 check in it right now
not sure, but maybe this comment was missed: https://github.com/ChickenKyiv/api-extended-database/issues/8#issuecomment-379879903 if you compare 2 datasources - you'll see the difference. not a big deal - i was trapped with same issue :) this is why i use mlab and simple version of connector
will try to update datasources on my PC and connect.
works for me
Did you change anything? Or run the code from this repository?
If i was you: 1) i'll re-read this comment https://github.com/ChickenKyiv/api-extended-database/issues/8#issuecomment-379879903 2) compare 2 datasources 3) update your datasource 4) paste mlab link from this issue: #5 5) run your project, find maybe(or not) another small issue(that you know how to deal with) 6) profit :)
Great. Thank you for guidance. I will do that.
no prob. it's just bad tutorial coverage. maybe i need to recreate it, in order to skip that stuff, confusing parts...
soon it will be less buggy. i mean it will be more easy to catch.
finally it worked. what a relief. I understood. Used id and password not specified so authentication was failing. now moving to part 2. :|
i don't want to steal that feeling from you. but i steal it from Ian - helped him with some small issue.. hope he'll didn't findout :)
On 13-Apr-2018 at 04:45 PM, Khyati wrote:
finally it worked. what a relief.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/api-extended-database/issues/8#issuecomment-381194250, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDqY7SLeEHmmwdQDeO9qDPNMMxH04ks5toNYogaJpZM4SuZsq .
still, you didn't do it well. please re-read again that comment related to datasources.
no no i haven't updated the code yet on git let me do it. After that i will do second step of that comment
will close this task, and move info into migration into another
Now uploaded code for first step of comment #8. Will work on second step and let you know sooon
got it. btw, it's good that you catched the name of datasource in migrate file. i got that as error frequently
On 13-Apr-2018 at 07:00 PM, Khyati wrote:
no no i haven't updated the code yet on git let me do it. After that i will do second step of that comment
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/api-extended-database/issues/8#issuecomment-381231686, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDp9ukmz_MRND5fZlguPkR8D7kbU1ks5toPXPgaJpZM4SuZsq .
when you'll switch from file with data into database - you'll need to run loopback.automigrate method. i have a samples, so buzz me and i'll move that information here.
5
this is the most recent version of import script that i did: https://github.com/ChickenKyiv/recipe-search-api/tree/master/bin
how to run this script: https://github.com/ChickenKyiv/recipe-search-api/blob/master/package.json#L15
not remember - but it can be broken at this moment. If it will crash - buzz me - and i'll finish it - cause i'm lazy to do it.
nice progress, BTW. we'll need an upload stuff for images soon