Laravel API Service
Using PHP Laravel I have created a RESTful API endpoint. I have also been developing it in a test-driven manner, in order to get familiar with that sort of development. Basically creating a set of tests for an endpoint, before implementing the endpoint. The source code is hosted on my Gitlab repo which has continuous integration and deployment to my Docker swarm. The endpoint is accessed at https://api.jazyserver.com/.
The API is hooked to a database container running MySQL. Working with Laravel is actually surprisingly pleasant. Although I’ve had previous exposure to Symfony, I recall there being a lot of boiler plate code for almost anything. But Laravel CLI makes everything super simple, and allowed me to focus on coding the logic for my endpoints and models.
I also made an endpoint, paired with a cron job that pings most of my other services, that shows me data about my other services’ status. The endpoint is https://api.jazyserver.com/status which I, probably obsessively, check to ensure my services are running.
Currently, I only have a couple of my services hooked to my API. I also use my API for some general endpoints like for my Content Security Policy (CSP) reporting endpoint.
1 thought on “Laravel API Service”