GithubHelp home page GithubHelp logo

Comments (37)

khyati0212 avatar khyati0212 commented on July 20, 2024 1

I saw it in testing Issue and am going through it. Working on Promises, ES6, testing from the article.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024 1

Go on. We will find a fix if it gets broke.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024 1

Now uploaded code for first step of comment #8.
Will work on second step and let you know sooon

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Please send me sample details.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

updated

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

@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.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

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.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

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!

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

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

[email protected] 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 ()
at setupModels (/mnt/c/GitHub/api-extended-database/node_modules/loopback-boot/lib/executor.js:199:23)
at execute (/mnt/c/GitHub/api-extended-database/node_modules/loopback-boot/lib/executor.js:40:3)
at bootLoopBackApp (/mnt/c/GitHub/api-extended-database/node_modules/loopback-boot/index.js:154:3)
at Object. (/mnt/c/GitHub/api-extended-database/server/server.js:26:1)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
at Function.Module.runMain (module.js:690:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Hi @atherdon did you get chance to look at it?

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

no, today i was playing and working with wood - it's clear my mind

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Ok. Np.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

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

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

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.

  1. will be to create a file/files, with arrays(you can grab that data from db.json file)
  2. then you'll need to create a file where you'll actually import data from array into db.
    as before - you should check the latest version at search-api - and see how i did it here.

btw, i think your issue related to something else, so i'm cloning your repo and will take a look right now

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

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.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

btw, be brave - i'm trying to broke your current git workflow. let's see how you'll solve it :)

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

buzz me if new configuration will not solve the error.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

should I merge the pull request you created?

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

yes, if you reviewed the changes and it's ok

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Previous error got resolved. In model-config.json datasource name was wrong.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

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. (/mnt/c/GitHub/api-extended-database/node_modules/mongodb-core/lib/connection/connection.js:452:17)
at Socket.emit (events.js:180:13)
at Socket.emit (domain.js:421:20)
at addChunk (_stream_readable.js:269:12)
at readableAddChunk (_stream_readable.js:256:11)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onread (net.js:578:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

will check it soon

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

@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.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

@khyati0212 check in it right now

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

not sure, but maybe this comment was missed: #8 (comment)
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.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

works for me

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Did you change anything? Or run the code from this repository?

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

If i was you:

  1. i'll re-read this comment #8 (comment)
  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 :)

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

Great. Thank you for guidance. I will do that.

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

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.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

finally it worked. what a relief. I understood. Used id and password not specified so authentication was failing. now moving to part 2. :|

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

still, you didn't do it well. please re-read again that comment related to datasources.

from api-extended-database-khyati.

khyati0212 avatar khyati0212 commented on July 20, 2024

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

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

will close this task, and move info into migration into another

from api-extended-database-khyati.

atherdon avatar atherdon commented on July 20, 2024

from api-extended-database-khyati.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.