Flats Investment API Backend
Simple API application for managing cash flow in various investments.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
It is recommended to use Docker to start local fully configured environment, but there is also builtin Laravel's server.
Before starting doing anything, run this script to create local (sqllite) database for testing purposes and seed it with some fake data. It also installs composer dependencies.
Be sure the script is executable.
A step by step series of examples that tell you how to get a development env running
Once the database credentials are configured and seeded, run Laravel's server or build Docker image.
php artisan serve
Then try to login by endpoint:
/api/login using any API Client like Postman with credentials:
email: email@example.com, password: admin
Don't forget to set the headers:
Content-Type: application/json X-Requested-With: XMLHttpRequest
Running the tests
Applications contains two kinds of test in the followings sub-dirs:
unit (names explains everything).
To run, perform a command:
It is enough to deploy application using "Deployer.org" predefined Laravel's recipe. Of course you have to customize it according server requirements.
- Sebastian Twaróg - Initial work - stwarog.com
This project is licensed under the MIT License - see the LICENSE.md file for details