Skip to content

info170/json-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

json-rpc

Laravel json-rpc test

How to use

(json-rpc server) In folder "weather-history":
  • Create or edit .env file to set your MySql settings
  • Run "composer update" to update dependencies
  • Run "php artisan key:generate" to generate application key
  • Run "php artisan migrate" to create DB table
  • Run "php artisan db:seed" to fill DB table with dummy data
  • Run "php artisan serve" to start it

    (json-rpc client) In folder "site":
  • Create or edit .env file set param JSON_RPC_SERVER_URL to url where json-rpc server started (for example JSON_RPC_SERVER_URL=127.0.0.1:8000)
  • Run "composer update" to update dependencies
  • Run "php artisan key:generate" to generate application key
  • Run "php artisan serve" to start it

    Access to server API using POST request to address server_url/api/
    Available methods:
    {"jsonrpc": "2.0", "method": "weather.getByDate", "params": {"date": "2020-10-30"}, "id": 1}
    {"jsonrpc": "2.0", "method": "weather.getHistory", "params": {"lastDays": 30}, "id": 1}
  • About

    Laravel json-rpc test

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published