PHP Classes

Configuring Microservices Framework - PHP Microservices Framework package blog

Recommend this page to a friend!
  All package blogs All package blogs   PHP Microservices Framework PHP Microservices Framework   Blog PHP Microservices Framework package blog   RSS 1.0 feed RSS 2.0 feed   Blog Configuring Microserv...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2023-06-20

Posted on: 2023-06-20

Viewers: 20 (June 2023 until August 2023)

Last month viewers: 1 (August 2023)

Package: PHP Microservices Framework

This article covers basic behind configuring DB and Routes for this freamework.




Loaded Article
1. DB Configuration:

This Framework provides feature to configure database credentials in .env file.

The below configuration is one among them.
dbHostnameDefault='127.0.0.1'
dbUsernameDefault='root'
dbPasswordDefault='shames11'
These configuration keys are to be set in m004_master_connection table. These connections are used by groups set as connection_id set in m001_master_group table.

The global database contains all the configuration and client database can be created and the configuration can be set as mentioned.

The client database can be a single in case you want to maintain a single db throughout your application.
This can also be tweaked to allow multiple db for respective client or a dedicated db instance for respective client f your requirement is to a next level.

2. Route Configuration:

Tables related to Route configuration are as below.

a. m003_master_route (Route details)
b. l001_link_allowed_route - (Route links)

The m003_master_route table's column route stores the actual route detail.

E.g. route can be /{table:string}/{id:int}.
Suppose one want to suffix admin and client routes than
route can be /admin/{table:string}/{id:int} & /client/{table:string}/{id:int}

Note a single entry represents a single type of route.
E.g. /{table:string}/{id:int} & /client/{table:string}/{id:string} should be configured separately.

For both point 1, 2; once done with these changes in the `global` db one needs to reload these in redis via reload API.



You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   PHP Microservices Framework PHP Microservices Framework   Blog PHP Microservices Framework package blog   RSS 1.0 feed RSS 2.0 feed   Blog Configuring Microserv...