Skip to content

Starter Template to start using Turso Database in Native PHP!

License

Notifications You must be signed in to change notification settings

darkterminal/turso-docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turso Docker PHP

Starter Template to start using Turso Database in Native PHP!

Requirement

If you want to connect with remote database and embedded replica, you will need an existing database to continue. If you don’t have one, create one.

Get the database URL:

turso db show --url <database-name>

Get the database authentication token:

turso db tokens create <database-name>

Assign credentials to the environment variables inside .env.

TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=

You will want to store these as environment variables.

Usage

Clone using Git SHH

git clone [email protected]:tursodatabase/turso-docker-php.git

or Clone using Git HTTPS

git clone https://github.com/tursodatabase/turso-docker-php.git

Open directory you just cloned in VSCode then cmd/ctrl+shift-p > Dev Containers: Reopen in Container:

Usage: ./start [OPTION]
  OPTION:
    -d, --daemon       Run PHP server in the background
    -s, --status       Show the status of the PHP server
    -k, --stop         Stop the PHP server
    -h, --help         Display this help message

Now! Open this address in browser: http:https://127.0.0.1:1945

Default connection is using local database file!

About

Starter Template to start using Turso Database in Native PHP!

Resources

License

Stars

Watchers

Forks

Packages

No packages published