Wednesday, 9 September 2020

Learn node to build a simple api or keep on truckin' with WordPress

Hey all!About my projectThere's a local annual 10 mile running race that's a big thing around where I live. The results are published as raw textual/tabular data after each race, so I scraped all of the race data since 2005, imported it all 50,000 results into a WordPress site and built a live-searching frontend with Vue.About meI know JS at an intermediate level I'd say. I know Vue and React relatively well.About WordPressMy current WordPress solution is working well enough. For a few years now, WP has had a built-in rest api. It's been working fairly well. The issues are:I don't want any of what WordPress offers me except the rest api.I need to host the site on a standard LAMP / LEMP stack and manage that myselfI don't know how to customize the api queries and results. I'm able to get pretty far mucking around with WP's api to feed the frontend, but I can't really go beyond the basicsI'm super not-interested in getting better with PHP / backend WPI have no idea how to change data structure for example. IE: If I wanted to add a new field to each record in the database — no idea at the moment.About NodeIs this a good use-case for Node/Express? An api to feed simple data into a React/Vue frontend via searching and filtering. Is this a common Node thing to do?Would MongoDB be my database in this case?I want to eventually make it easier to duplicate my api for other sets of race data — ie: I have 3-5 other races I'd like to make searchable databases of.I know people hate questions like this, but how hard would it take me to learn enough Node to pull this off, given my intermediate-ish JS knowledge?Thank for your time!

Submitted September 09, 2020 at 02:54PM by johnwhitely2020

No comments:

Post a Comment