ChickenKyiv / recipe-dash

we'll archive it later. not a lot of progress at this repo
0 stars 2 forks source link

how i can see working project? #4

Open atherdon opened 6 years ago

atherdon commented 6 years ago

i think screenshot or video will work fine for now, but maybe later we'll need to setup a loopback instance on heroku

mendoncagary commented 6 years ago

i will try setting up it on heroku

atherdon commented 6 years ago

I can help you - i have an example on recipe-api server. will share it here

atherdon commented 6 years ago

"for now I have put the API code in https://github.com/mendoncagary/recipe-dash-api and the server code in https://github.com/mendoncagary/recipe-dash-admin I have also hosted both the server and the api on heroku https://recipe-dash-api.herokuapp.com/explorer/ https://recipe-dash-admin.herokuapp.com/"

@mendoncagary i'll check it soon and came back to you

atherdon commented 6 years ago

Still i want to store code at my repo, in order to have ability to extend team with other developer... and it's send a notifications to my email, so it's essential to find a way. will think about it

atherdon commented 6 years ago

@mendoncagary if i get you right, dash-admin is place where forest is connected, right? how i can check forest admin, can you give me url, pass, credentials?

atherdon commented 6 years ago

current repos: https://github.com/mendoncagary/recipe-dash-api https://github.com/mendoncagary/recipe-dash-admin

mendoncagary commented 6 years ago

the recipe-dash admin is where forest admin is connected. Send me ur email and i will add u in forest admin

atherdon commented 6 years ago

@mendoncagary arthur.tkachenko.netweight@gmail.com

mendoncagary commented 6 years ago

I hv sent u an invite and I will connect the forest admin to loopback. Regarding the models, what should it contain?

atherdon commented 6 years ago

invite was received.

can you make your question clear about models? main idea was to add models, related to recipes and ingredients at the first steps.

So release #0 for this project will be: admin can login via forest. using forms he add a new recipes into our database and then via loopback api we'll be able to see that data at json format. i'm traveling right now. and still not finished my prev reply to you.

if you have time right now and want to go forward, you can check the models logic at this project: https://github.com/ChickenKyiv/recipe-api-only/tree/master/server/models

atherdon commented 6 years ago

link to forest: https://app.forestadmin.com/projects

atherdon commented 6 years ago

@mendoncagary Reviewed your code. Notes from me:

1) Our next step can be to move 'forest liana' from clean express install into loopback. basically, loopback have ExpressJS inside. i'll share some examples below.

This repository is an official connector between Loopback and forest, but i'm not sure if it works well. it was not updated a lot, so errors is possible. but we must try it: https://github.com/ForestAdmin/forest-loopback

2) we also can connect using a strict js code, it's not a big deal too, but i want to explore option1 We have forest init here: https://github.com/mendoncagary/recipe-dash-admin/blob/master/app.js#L30 We'll need to move it into server file. you can see how i connected express-like middleware at groceristar project: https://github.com/atherdon/groceristar/blob/master/server/server.js


Question I cannot find any models at dash api folder. i can help with it. you need my help?

This can be done, when we create a connection between loopback and forest. Main idea was to add models, related to recipes and ingredients. A lot of work was done at recipe-api repository. list of models you can see here: https://github.com/ChickenKyiv/recipe-api-only/tree/master/server/models 0) for a first stages we can just copy-paste recipes model & ingredients model 1) in order to import test data we can copy import script from bin folder. i can explain details later...

then we run import script and add data to our mongodb instance. if loopback and forest connected well, we'll be able to see data from mongodb at forest dashboard


Summary

I think that we must try to install forest-loopback package at api first. but you need to change this option(readme.md at forest-loopback) Add the following code to your app.js file: and connect it at server.js -> similar to groceristar server.js file -> i think it'll help

please tell me if this is clear for you or i must to clarify something. tnx

atherdon commented 6 years ago

i'm updating the package of loopback connector here: https://github.com/atherdon/forest-loopback/

mendoncagary commented 6 years ago

I have added the forest-loopback package at https://github.com/mendoncagary/recipe-dash-api/blob/master/server/server.js.

But it does not seem to connect to forest admin. Loopback gives an error 'Cannot GET request /forest" . Am I doing it right?

atherdon commented 6 years ago

there can be a few problems. i think i can help. but can you move the code into my repository. it's kind a complex for me to be updated with different projects.

i also plan to help you with models. and i cloned the forest-loopback package - in case that it's not working well - i'll be able to debug it. i also make a friends at Forest company - because i'm following on their work more than one year. and they will be able to help us too.

On 03-Mar-2018 at 01:12 PM, Gary Mendonca wrote:

I have added the forest-loopback package at https://github.com/mendoncagary/recipe-dash-api/blob/master/server/server.js .

But it does not seem to connect to forest admin. Loopback gives an error 'Cannot GET request /forest" . Am I doing it right?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ChickenKyiv/recipe-dash/issues/4#issuecomment-370146582, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZrDq5UpjMdHhX_a0nizLBfRnzonS7_ks5tapa1gaJpZM4SJ2Bh .

atherdon commented 6 years ago

if you want, i can move project by my hands, but i think it'll be cool to do for you - so you'll train your git skills.

btw, if this issue about routes only, you can this sample(i create a express routes inside loopback framework) - maybe it'll helps you: https://github.com/GroceriStar/groceristar/blob/master/server/boot/index-router.js

mendoncagary commented 6 years ago

i will move the code into your repository. Is it this /ChickenKyiv/recipe-dash. Because i am not a collaborator.

atherdon commented 6 years ago

i think yeah, hold on i'l add you as collab right now.

atherdon commented 6 years ago

@mendoncagary you have a write access, please try

mendoncagary commented 6 years ago

i hv checked in my code.

atherdon commented 6 years ago

ok, good. do you need something else from me now? i'l be able to help you with testing if you wish

mendoncagary commented 6 years ago

I am having a problem connecting forest to loopback. If u could have a look at it.

atherdon commented 6 years ago

@mendoncagary ok, i'll take a look, not a problem. i think this is debugging problem. will send you a message soon

atherdon commented 6 years ago

@mendoncagary Ok, i think i fixed at least issue that you've mentioned. After loggin at Forest I cannot see any databases, but i think this is just a configuration case and you'll figure it out.

WIll move an updates to repo in a few minutes. Have a nice weekends! arthur

atherdon commented 6 years ago

@mendoncagary do you need my help? want to move this part of project forward, plan to launch a release 0 version of chicken-kyiv project

mendoncagary commented 6 years ago

Tried making the models visible in the forest admin. But the models are not found in forest admin.

atherdon commented 6 years ago

@mendoncagary good to know! btw, just few seconds ago i receive a few notifications from error tracker. i assume it should be shared with you, right?