ti-click / laravel-with-colopl-tidb-driver-realworld-example-app

Laravel implementation of the RealWorld app
MIT License
1 stars 0 forks source link

Real World base Laravel For TiDB and TiDB Cloud

Thanks alexeymezenin/laravel-realworld-example-app project offer so great example.

This Project is created for Ti-Click project join PingCAP Hackathon 2022.

  1. Ready the TiDB Cluster

You can create the TiDB Cluster on TiDB Cloud which offer free TiDB Cluster.

  1. Access Gitpod Access Real World base Level link and open the Gitpod online IDE.

Or you can install Gitpod Chrome extension in advance, so you can just click the Gitpod button on the project's home page.

  1. Experience Real World base Laravel For TiDB
  1. Experience Real World base Laravel For TiDB Cloud
DB_HOST={TIDBCloud-Host}
DB_PORT=4000
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD={TIDBCloud-password}

You can get the ip by the command in a Gitpod terminal below. Please add it into your TiDB Cloud security.

curl https://ipinfo.io/ip

alexeymezenin/laravel-realworld-example-app README.md

Laravel implementation of RealWorld app

This Laravel app is part of the RealWorld project and implementation of the Laravel best practices.

See how the exact same Medium.com clone (called Conduit) is built using different frontends and backends. Yes, you can mix and match them, because they all adhere to the same API spec

How to run the API

Make sure you have PHP and Composer installed globally on your computer.

Clone the repo and enter the project folder

git clone https://github.com/alexeymezenin/laravel-realworld-example-app.git
cd laravel-realworld-example-app

Install the app

composer install
cp .env.example .env

Run the web server

php artisan serve

That's it. Now you can use the api, i.e.

http://127.0.0.1:8000/api/articles