Listen to the DOM!

Back end

I started by creating two different repositories: one for the frontend and one for the backend. To get started on the backend, I created a new rails project and a passed the “--api” flag, which will automatically set up files that will allow us to use the app as an API. For expediency, I took advantage of Rails’ scaffold generator and began by scaffolding two resources, a garden and a plant, created the attributes I wanted for each one and set up a relationship between them. In this case a garden has many plants and a plant belongs to a garden.

Rails backend
Rails backend cors.rb file


JSON backend



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store