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

First step. Loopback intro #1

Closed
atherdon opened this issue Mar 12, 2018 · 37 comments
Closed

First step. Loopback intro #1

atherdon opened this issue Mar 12, 2018 · 37 comments
Assignees
Labels
discuss-in-comments good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atherdon
Copy link
Contributor

https://github.com/optis/loopback-rest-api - this is the best tutorial that helps me 1 year ago.

Please buzz me before including mongodb database - so i'll generate a new instance for you.

As I want to see your progress - please use this repo and push your progress here. Share with me progress and questions that i can help you with. Don't hesitate to use my help. I willing to start fast and with less stress for you at the beginning. Also will check your git skills.

@atherdon atherdon added help wanted Extra attention is needed good first issue Good for newcomers discuss-in-comments labels Mar 12, 2018
@khyati0212
Copy link
Collaborator

Is there any timeline to finish?

@atherdon
Copy link
Contributor Author

atherdon commented Mar 12, 2018 via email

@khyati0212
Copy link
Collaborator

Yeah that is why I asked as I am new to this. I will let you know as soon as I reach to mongo-db.

@atherdon
Copy link
Contributor Author

atherdon commented Mar 12, 2018 via email

@atherdon
Copy link
Contributor Author

Btw, if you need any help with this task - feel free to ask. You also can move your current progress(code) here, so i'll be able to track you

@khyati0212
Copy link
Collaborator

oh ok. I will do that today.

@khyati0212
Copy link
Collaborator

Sorry for not posting that before. I am still new to Git so I didnt knew how to do it.

@atherdon
Copy link
Contributor Author

@khyati0212 it's ok - i figure this out and this was the reason why i ask this. in order to train you :)

@khyati0212
Copy link
Collaborator

Thank you for understanding as always.

@khyati0212
Copy link
Collaborator

@atherdon I was just going through a tutorial on Lynda.com regarding this.

@atherdon
Copy link
Contributor Author

you mean git basics? if yes, please read also about git flow approach then

@khyati0212
Copy link
Collaborator

No no.. Loopback API

@atherdon
Copy link
Contributor Author

Ohh, got it. Good choice. But keep noted, that we're using Loopback v.3 - soon it will be a big shift into loopback 4 - but we're not ready for it - at this moment

@khyati0212
Copy link
Collaborator

oh ok. Tutorial is for loopback 4.

@atherdon
Copy link
Contributor Author

Lol. I'm a wizard :))))

@khyati0212
Copy link
Collaborator

Yeah. :) now i think I should stick with given tutorial than.

@khyati0212
Copy link
Collaborator

@atherdon need help. I was doing the loopback tutorial and used to lock my PC most of the time but this time I had to restart it and now when I am tring to access that "reservation" app again it is giving error. How to open it again?

@atherdon
Copy link
Contributor Author

what error and by access you mean start nodejs server, right?

@khyati0212
Copy link
Collaborator

events.js:154
throw er; // Unhandled 'error' event
^

Error: The generator must be run in an empty directory.
at /usr/local/lib/node_modules/loopback-cli/node_modules/generator-loopback/app/index.js:247:12
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-workspace/common/models/workspace.js:488:11
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/dao.js:2009:11
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:396:17
at done (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:167:19)
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:40:16
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:393:21
at /usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/dao.js:1986:17
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at doNotify (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
at Function.ObserverMixin._notifyBaseObservers (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:122:5)
at Function.ObserverMixin.notifyObserversOf (/usr/local/lib/node_modules/loopback-cli/node_modules/loopback-datasource-juggler/lib/observer.js:97:8)

@atherdon
Copy link
Contributor Author

i think i got it.
you don't need to run a generator twice.
your loopback instance was created in first time.
you just need to run
node server/server.js
try and tell me if this works

@khyati0212
Copy link
Collaborator

Not working
Another error

Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
events.js:154
throw er; // Unhandled 'error' event
^

Error: EACCES: permission denied, open 'db.json'
at Error (native)

@atherdon
Copy link
Contributor Author

can you upload files from your computer into this repo - it's hard to debug things online.
btw, do you have db.json file?

@atherdon
Copy link
Contributor Author

you can find upload files button at the root of the repo and drag-n-drop them

@khyati0212
Copy link
Collaborator

Finally I uploaded it

@khyati0212
Copy link
Collaborator

"sudo npm start "

This command helped. Now its running fine. Thank you for help. I was googling the answer but was not able to find so have to ask you.

@atherdon
Copy link
Contributor Author

got it.
btw, in order to make your life easy, please install raven package. this is a good tool, that will be able to show you what and where things were broken on your code.
basically it's error tracker. i'll show you how to configure it.
and don't forget to push changes on code repository.

@khyati0212
Copy link
Collaborator

Now i can push changes easily once repository is created. Thank you for help.
Using "https://github.com/getsentry/raven-python" to install raven.

@atherdon
Copy link
Contributor Author

you need to run npm install raven - this is javascript version that we need

@khyati0212
Copy link
Collaborator

Done

@atherdon
Copy link
Contributor Author

small question - you create a separated repository and upload your code into it?

@khyati0212
Copy link
Collaborator

yeah. was I suppose to not do that?

@atherdon
Copy link
Contributor Author

atherdon commented Mar 16, 2018 via email

@khyati0212
Copy link
Collaborator

Oh ok. Sorry I misunderstood it. I can post code in this one too.
As I said I am new to github. :|

@atherdon
Copy link
Contributor Author

atherdon commented Mar 16, 2018 via email

@khyati0212
Copy link
Collaborator

Ok. Let me if you need any help.

@atherdon
Copy link
Contributor Author

atherdon commented Mar 16, 2018 via email

@khyati0212
Copy link
Collaborator

I can try. Do send me once you are done.

@atherdon atherdon closed this as completed Apr 9, 2018
khyati0212 pushed a commit that referenced this issue Apr 9, 2018
…3.18.3

Bump loopback from 3.18.2 to 3.18.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss-in-comments good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants