-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YODA-T-64 Update example's README.md with instructions for setting up…
… the example and running the application
- Loading branch information
1 parent
c794547
commit a029002
Showing
1 changed file
with
32 additions
and
5 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 |
---|---|---|
@@ -1,12 +1,39 @@ | ||
# Example | ||
# Instructions for running this example | ||
|
||
First, create a `.env` file in this example directory with the following content: | ||
|
||
**Run** | ||
```bash | ||
API_KEY="your-app-api-key" | ||
USERNAME="your-app-username" | ||
``` | ||
|
||
First, make sure to put your sandbox api key in `index.php`, then: | ||
Next, install the dependencies using [Composer](https://getcomposer.org): | ||
|
||
```bash | ||
$ composer install | ||
``` | ||
|
||
Finally, run the [PHP built-in server](https://www.php.net/manual/en/features.commandline.webserver.php): | ||
|
||
```bash | ||
$ php -S localhost:9090 | ||
$ # open http://localhost:9090 | ||
``` | ||
``` | ||
|
||
Open your browser and navigate to [`http://localhost:9090`](http://localhost:9090) to see the example in action. | ||
|
||
## Folder/File tree | ||
|
||
```bash | ||
. | ||
├── README.md # The example's README file. | ||
├── composer.json # The Composer file for the example. | ||
├── index.php # The entry point for the example. | ||
├── public # Contains the frontend files for the example. | ||
│ └── js | ||
│ └── main.js | ||
│ └── css | ||
│ └── style.css | ||
├── views # Contains the views for the example. | ||
│ └── index.php | ||
└── .env # The environment file where you add your credentials. | ||
``` |