cameronscott137's avatar

Using Javascript with Lumen

I'm building a small API using Lumen. The workflow will be:

  1. The API accepts a user-inputted zip code.
  2. The API uses leaflet.js to geo-encode that zip into latitude and longitude, and place it within a set of custom geoJSON polygons
  3. The API returns data based on the results of that placement

However, I'm unsure how to proceed with Step 2. I need a small piece of Javascript to manage that geo-encoding process, but I'm not sure where that fits in with how Lumen wants to work.

The rest of the API is so simple that it seems silly to spin up an entire Laravel application just to support it, but I'm not sure how to incorporate that script into the Lumen workflow.

Has anyone come up against this problem before?

0 likes
0 replies

Please or to participate in this conversation.