-
Notifications
You must be signed in to change notification settings - Fork 103
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
Dummy Data #5
Comments
Hi @AmanSingh137, thanks for opening up the issue. The backend APIs are "down" because I'm using Heroku for the backend which shut down its free-tier plan (which the project was using) and I don't intend to switch to a premium plan. Basically, no backend service to connect to. I haven't found a decent free alternative to Heroku and I also don't have the time to migrate at the moment. Furthermore, I don't have any JSON files for the data. You can try using something like DummyJSON. Regarding likes: [{ type: mongoose.Types.ObjectId, ref: 'User' }],
bookmarks: [{ type: mongoose.Types.ObjectId, ref: 'User' }],
unicorns: [{ type: mongoose.Types.ObjectId, ref: 'User' }],
//1 post => 1 author, hence an object
//mongoose.Types.ObjectId tells mongoose it's a real mongoose id
//'ref' establishes connection between postSchema and userSchema
//The ref option is what tells Mongoose which model to use during population (It will populate post with the author)
comments: [{ type: mongoose.Types.ObjectId, required: true, ref: 'Comment' }],
author: { type: mongoose.Types.ObjectId, required: true, ref: 'User' }, Let me know if you need any further help :) |
Hi, thanks for your help. By the way, the problem wasn't about having dummy data, but the problem was to run the APIs locally. I did that and the user experience of uploading posts and using them with multiple users and playing with notifications is fun. for others, I would say to please use app.use(cors()); if you are getting cors error and remove google, github, twitter and other modes of authentication in order to proceed further. You can implement those by reading the current documentations by yourself, but for beginning purpose, please comment out those features to learn how the code really works. Closing the issue now. |
Hey @eknoorpreet , it would be a great help if you could provide me with some dummy data since I am new to Open source and I am giving it a try to add features to this codebase. Also, your backend APIs are down so it is making no sense on how to create data for this web app since there are so many models associated in the backend and the datatype of each parameter is referred to as mongoose.Types.ObjectId . Please turn on the backend API or please provide me with the JSON files which could be used to run the frontend at least.
PS: I am not using this project to submit it to my college or something XD. Hope you would help.
Thanks.
The text was updated successfully, but these errors were encountered: