Skip to content

Commit

Permalink
YODA-T-64 Update example's README.md with instructions for setting up…
Browse files Browse the repository at this point in the history
… the example and running the application
  • Loading branch information
DaggieBlanqx committed Nov 25, 2024
1 parent c794547 commit a029002
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions example/README.md
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.
```

0 comments on commit a029002

Please sign in to comment.