lelouchB / final-space-api

Final Space API : RESTful API based on the show Final Space.
https://finalspaceapi.com
BSD 3-Clause "New" or "Revised" License
78 stars 47 forks source link

Add data seeder to backend #64

Closed mhalsubhi closed 3 years ago

mhalsubhi commented 3 years ago

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 commented 3 years ago

Hello, I would like to collaborate with this

lelouchB commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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

mhalsubhi commented 3 years ago

@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 commented 3 years ago

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

mhalsubhi commented 3 years ago

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

lelouchB commented 3 years ago

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

mhalsubhi commented 3 years ago

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

guzbarraf commented 3 years ago

@lelouchB i have the code for the task 1

lelouchB commented 3 years ago

@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 commented 3 years ago

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

Thanks

lelouchB commented 3 years ago

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