Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

I1820/backend.php

Repository files navigation

Platform Backend

Drone (cloud)

Introduction

Every microservice architecture must have a glue and its our glue for I1820 Platform. This service handles authentication, authorization, and acts as a proxy between frontend and other services. It also caches the additional information about projects and things.

Up and Running

Let's up and run this piece of shit on ubuntu 18.04 with nginx. First of all you must install the php.

sudo apt install curl php-cli php-mbstring git unzip
sudo apt install php-fpm php-pear php-dev
sudo apt install php-curl

Then you must install the php composer for php package management.

curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm composer-setup.php

Almost Done! Install the mongodb extension for php with the following command.

sudo pecl install mongodb
# remember to enable mongodb extension on php.ini [extension=mongodb.so]

You have the php environment so let's run this shit and its requirements!

docker-compose up -d
composer install
php artisan key:generate
php artisan config:cache
php artisan jwt:secret

# setup database
php artisan migrate:fresh
php artisan db:seed

# setup the loraserver.io as a lora connectivity
php artisan loraserver:setup

php artisan serve --host=0.0.0.0 --port=7070

Errors Numbers

sjd-backend returns the following error codes with HTTP 200 OK:

  • 701 UnAuthorized
  • 704 Not Found
  • 706 Already Existed
  • 707 Validation Error

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages