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

Add data seeder to backend #64

Closed
mhalsubhi opened this issue Oct 7, 2020 · 13 comments
Closed

Add data seeder to backend #64

mhalsubhi opened this issue Oct 7, 2020 · 13 comments
Assignees
Labels

Comments

@mhalsubhi
Copy link
Contributor

When cloning a project locally, there is no data to start with for testing or experiment with, so it will be nice if there's a seeder to seed data to the local database.

I'm thinking of adding an npm script called seed so we will have command npm run seed to seed local database with current actual data fetched from api

so basically the npm run seed will:-

  1. connect to local database
  2. fetch data from api.
  3. seed local database.

I think the file will be named seeder.js and it will be in the root of backend folder and use Axios as dev dependency

If you like the idea assign it to me so I'll give it a shot

@guzbarraf
Copy link
Contributor

Hello, I would like to collaborate with this

@lelouchB
Copy link
Owner

lelouchB commented Oct 8, 2020

@mhalsubhi
This is awesome, this was on my ToDo.

Thanks for making an issue for this.

@guzbarraf sure, you both can collaborate on this. If it is okay with @mhalsubhi.
@mhalsubhi let me know if you are open to collaborate?

In the meantime, I will assign this to both of you. 💯

@mhalsubhi
Copy link
Contributor Author

@lelouchB sure, I would like to collaborate with @guzbarraf, so we will divide it into two tasks

  1. fetch data from API using Axios as dev dependency.
  2. seed database with fetched data with npm run seed.

@guzbarraf choose what task you would like to work on and I'll pick the other one 👍🏼

@guzbarraf
Copy link
Contributor

I am happy to collaborate with you @mhalsubhi and I take the first task

@mhalsubhi
Copy link
Contributor Author

@guzbarraf so I'm I 👍🏼 , we will create seeder.js in the backend folder, in the file data will be fetched using Axios, after you complete it, please mention me so I can use your fetched data to seed database.

@lelouchB
Copy link
Owner

lelouchB commented Oct 8, 2020

Hey @guzbarraf and @mhalsubhi
See #85
You can use this in the issue.

@mhalsubhi
Copy link
Contributor Author

@lelouchB ok 👍🏼, If you want this to be done quickly, I will work on it and send PR shortly

@lelouchB
Copy link
Owner

lelouchB commented Oct 8, 2020

@mhalsubhi
I will appreciate if it can be done quickly but I am in no rush.
Take your time.
Thanks 😊

@mhalsubhi
Copy link
Contributor Author

@lelouchB @guzbarraf I'm excited to apply this feature, so I send PR #91 👍🏼

@guzbarraf
Copy link
Contributor

@lelouchB i have the code for the task 1

@lelouchB
Copy link
Owner

lelouchB commented Oct 8, 2020

@lelouchB i have the code for the task 1

@guzbarraf
I guess this issue is almost complete
But you can go ahead and send the PR, I will approve it so that it can be counted as a valid Hacktoberfest contribution.

Can you let me know what kind of issues you are interested on frontend, backend, test, bugs, etc.
And I will try to come up with an issue for you and assign it you .

Thanks

@guzbarraf
Copy link
Contributor

@lelouchB
that sounds great i will submit the PR and be interested in some frontend.

Thanks

@lelouchB
Copy link
Owner

lelouchB commented Oct 8, 2020

@lelouchB
that sounds great i will submit the PR and be interested in some frontend.

Thanks

Great 👍
I will create some frontend issues and mention you.
How about #32 ?
You have to create examples in language and frameworks of your choice.

guzbarraf added a commit to guzbarraf/final-space-api that referenced this issue Oct 8, 2020
lelouchB pushed a commit that referenced this issue Oct 9, 2020
* add database seeder to backend (#64)

* fix LGTM alerts (#64)

* move seeder file to helpers folder
@lelouchB lelouchB closed this as completed Oct 9, 2020
guzbarraf added a commit to guzbarraf/final-space-api that referenced this issue Oct 9, 2020
lelouchB pushed a commit that referenced this issue Oct 10, 2020
* add database seeder to backend (#64)

* fix LGTM alerts (#64)

* move seeder file to helpers folder

* fix eslint errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants