Wednesday, 6 February 2019

[Beginner Question] What is the easiest way to create local JSON api?

My question is simple(i think).​I just want to create a local JSON api; for ex: (news.json) and i want to add(or write) objects to it dynamically with an input.Adding object to news.json is okay but how can i make that news.json file VALID JSON?> For ex. i can add {newsTitle : "Lorem", newsTime: "Today"} but when i add again, i have to put comma.​So, how can i make it with node? What is the easiest way?Thank you in advance!

Submitted February 06, 2019 at 11:06AM by mburakerman

No comments:

Post a Comment