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

[Backend] Serving routes from json #1

Open
singhayushh opened this issue Apr 24, 2021 · 0 comments
Open

[Backend] Serving routes from json #1

singhayushh opened this issue Apr 24, 2021 · 0 comments
Labels
challenging required some research before implementing help wanted Extra attention is needed

Comments

@singhayushh
Copy link
Contributor

Preface

For this website, we plan to have a admin page to create blogs so that they don't have to write in html and design the css for every blog - just a normal wysiwyg editor will be there that will be adding blogs directly to client/blogs.json. This json file is being parsed by the backend and subsequently, the various endpoints for the blogs are being exposed. [ Read the format of blog.json - everything will be filled from a form available in frontend ]

To expose the endpoints, what I have currently configured is when the server starts, the various documents from the json file are taken and a route for each of them is declared using the url key for each blog document.

Changes needed

Instead of exposing a route for each blog, we need to have a single /blog/:id endpoint where the id will be mapped from the url key of the blogs.

@singhayushh singhayushh added challenging required some research before implementing help wanted Extra attention is needed labels Apr 24, 2021
singhayushh pushed a commit that referenced this issue May 26, 2021
Updated and ordered files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenging required some research before implementing help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant