Comments (6)
@ashishkharcheiu the only way to populate data is through adding to the database. The posts actually come from the Wordpress API via the sedaily-miner. If you're looking only to use the API with pre-seeded data then you should be able to accomplish it this way:
git clone [email protected]:SoftwareEngineeringDaily/sedaily-front-end.git
cd sedaily-front-end/devops
docker-compose up
Then open your browser to http://localhost:4040/api/posts.
from software-engineering-daily-api.
Ahh. the posts came from sedaily-miner! I was wondering what's the source.
So to use api-repo as standalone, I might have to create my own POST endpoints and code to generate post id and all content.
Thank you for response.
from software-engineering-daily-api.
@ashishkharcheiu you can use Docker to run the API and the database which has data already seeded. Check out the README for how to run it.
from software-engineering-daily-api.
@andrewmarklloyd Backend is running with MongoDB using docker. I have looked at SWAGGER API docs as well.
When we run the app, the "posts" collection is empty. The ISSUE I am asking to assist with is "how do we fill the collection "posts" with data, as I could not see any POST request for it.
In the below link, https://software-enginnering-daily-api.herokuapp.com/api/posts you see the data is available for the link, BUT how can I input the data in same way in "posts" collection so that when I do request: "https://localhost:4040/api/posts, I get the "posts" data and NOT the empty array.
Hope it clears what I am asking.
The only way I see is adding data directly to MongoDB database with an POST API endpoint for it.
from software-engineering-daily-api.
@ashishkharcheiu my apologies, I was confusing two of the repos. I was thinking about the front-end repo which references the pre-seeded Docker image. If you take a look at the front-end repo readme it talks about using that image. You can basically use this docker-compose file instead
https://github.com/SoftwareEngineeringDaily/sedaily-front-end/blob/master/devops/docker-compose.yml
from software-engineering-daily-api.
@andrewmarklloyd I read the README in front-end repo and also ran the vue App.
But it was not related to the issue it seems. I am going to write what I expected with backend and what I received to convey my issue better.
-
https://github.com/SoftwareEngineeringDaily/software-engineering-daily-api -> Clone the repo and run as per README in the api-repo.
-
Use POSTMAN and create "posts" through a POST request. --------> Here, I assumed I would find an endpoint for creating NEW posts, but I did not find looking through SWAGGER docs and code itself. (Note: I was able to create a USER through a POST request to clarify.)
-
NOW I am confused at this point, so there is NO endpoint for creating "posts" through POSTMAN, then how the data or episodes or posts are added to the database by the developers??
To be clear, How to populate / create / add New DATA to this "posts" collection through POSTMAN?
from software-engineering-daily-api.
Related Issues (20)
- Improve Onboarding Experience
- Add "upvoted" and "downvoted" to 'listened' api, for recent activity feed
- Ability to Save to Listen Later From Desktop To Phone HOT 2
- Add section to readme for env vars
- Automatically Scrape "Show Notes" and add them to "Related Links" HOT 1
- Create Wiki Feature Backend
- Create notifications backend
- Architect badge system
- Guest object system project
- Missing `AWS_PROFILE_PIC_BUCKET_NAME` in development image tag HOT 5
- As a listener, I would like to filter out episodes I have listened to HOT 2
- Prevent broken `author` ObjectId references in forumthreads collection HOT 1
- MP3 URL is not provided as https
- New route with less user info for comments
- Bookmarks Question HOT 8
- Rename Backend Heroku API
- Migrate to Render
- Migrate api code to typescript
- Migrate api to graphql for easier cross-platform access and addressability on the frontend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from software-engineering-daily-api.