Mango Backend is the repository that powers our frontend application. Setting up the backend is fairly simple. This guide assumes you have a standard LAMP install working. If you do not have a LAMP stack installed, check out XAMPP. Once installed, be sure to create a database for Mango.
Installation
-
Clone github repo:
git clone https://github.com/mangoapp/backend.git
-
Install Composer, and run
composer install
in your cloned directory. You may need to runphp composer.phar install
if you have not added composer to your PATH. -
Copy
.env.example
to.env
and fill in your database connection information -
Run
php artisan migrate
, followed byphp artisan db:seed
-
Generate a JWT secret:
php artisan jwt:generate
-
Generate an app secret:
php artisan key:generate
-
If you are running Apache, copy the following into your config file:
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
You can now navigate to http://localhost/backend/public and begin making API requests. To view available API requests, please refer to the Wiki.