As hackneyed and precious as it may be interpreted, we actually believe that records can be powerful hoodoo totemistic and utilitarian objects that can further the development of culture, revolution and spirituality. They can be more than just cultural commodities.
– Eric Isaacson, Mississippi Records
This project contains the source code for PHP web API developed using the Lumen framework with the Eloquent ORM. Dependencies are managed using Composer.
Download the project
git clone https://github.com/seanpierce/api.mississippirecords.net
Install dependencies
composer update
Create a mysql database and add the connection info to the .env
file in the projetc's root
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=8889
DB_DATABASE=lumenapidb
DB_USERNAME=root
DB_PASSWORD=root
php artisan migrate
Seed the database with placeholder data
php artisan db:seed
Move this project to the root of your server's directory
mv api.mississippirecords.net ~/Sites/api.mississippirecords.net
In your browser, navigate to the project via your server's localhost port: http://localhost:8888/api.mississippirecords.net/
# from the public directory (default configuration)
php -S localhost:8000 -t public
# from the root directory
php -S localhost:8000
In your browser, navigate to: http://localhost:8000/
Generate a migration for the project's database
# Generate a migration for the project's database
php artisan make:migration create_some_table
# Specify a table to update with the "--table" flag
php artisan make:migration update_some_table --table=some_table
Download the latest postman docs/ API request and response data here.
# Reset the database
php artisan migrate:refresh --seed
# Run the tests
vendor/bin/phpunit
# Run a specific test group
vendor/bin/phpunit --group=some_group_name
Create and enable CORS midlewareEstablish Pilot subdomainDeploy API as a proof-of-concept- Develop more meaningful unit tests. Reference this article.
- Create email queue, or employ email queuing service.
- Implement repository design pattern, creating a data access layer, via this article.
Besides being a staunch open-source advocate, it's important for me to keep a public-facing document of my progress with new (to me) technologies. It leads me to be more responsible with my development, and write cleaner code. Additionally, I aim to follow the OWASP principal which encourages organizations to "avoid security by obscurity".