forked from joindin/joindin-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the PHP dev server info to a separate README file
- Loading branch information
Showing
2 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Quick start with the PHP dev server | ||
|
||
The API will run happily under the [PHP development server](http://php.net/manual/en/features.commandline.webserver.php). You will need to have a MySQL running with the Joind.in schema availble, referenced from the src/database.php file (see below about initialising the DB). Note that the web2 site will also run under the built-in webserver, but will need to be on a different listening port. | ||
|
||
To run the API on http://localhost:8080/, do the following: | ||
``` | ||
cd src/public | ||
export JOINDIN_API_BASE_URL=http://localhost:8081 | ||
php -S localhost:8081 index.php | ||
``` | ||
|
||
## Initialising the database | ||
|
||
As you are not using the Vagrant setup, you will need to provide your own MySQL database and configure it in src/database.php. Once there is an empty database and a username/password, you can setup the tables by running the patch script at scripts/patchdb.sh with the "-i" (initialise DB) option. | ||
|
||
``` | ||
cd scripts | ||
./patchdb.sh -t ../ -d <DB name> -u <DB username> -p <DB password> -i | ||
``` | ||
|
||
If you already have a development DB, but you want to patch it up to the latest structure, then run the same command except omit the "-i" option. | ||
|
||
``` | ||
cd scripts | ||
./patchdb.sh -t ../ -d <DB name> -u <DB username> -p <DB password> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters