Closed tomcam closed 6 years ago
Rewatched the video and saw I needed to do something like this:
http://localhost:8080/api/contents?type=Article
And I see I can view the JSON data like this:
localhost:8080/api/content?type=Article&id=1
Am I responsible for generating HTML from the JSON record, or is there way to render HTML instead of JSON?
@tomcam - my comment to your issue #235 may add some context to this. But, you are responsible to write the code to show your data in a structured presentation format. HTML is one, but being simply a JSON API, Ponzu can send your data to you mobile app, website, TV app, etc, all using the same server.
Ponzu has no notion of "themes" or any kind of front-end, which adds a lot of flexibility to your end project, but does require a bit more work than something like Wordpress or Drupal which come with the front-end bundled in.
Does that make sense? I apologize if I'm skipping over some detail here.
It all makes absolute sense. Once you said said in issue #235, everything fell into place.
Ponzu is only responsible for managing data/content in its CMS, and responding to API requests for that data in JSON form.
Your sample code was the cherry on top and I greatly appreciate your answers! Thanks tons.
When I look at the upload directories such as http://localhost:8080/api/uploads/2018/03/1522124717- they are empty, and I get 404s. For example, I created an article type like this:
But nothing appears to be in those upload directories.