Skip to content

Commit fd31af6

Browse files
updating readme for tutorial series concept
1 parent f72a1b3 commit fd31af6

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,36 @@ This repository is home to the code examples highlighted in various [Shopify API
77
#### 01 Getting Started
88
- Building a public Shopify application ([tutorial](https://help.shopify.com/api/tutorials/building-public-app))
99

10-
#### 02 - Charging For Your App
11-
- Billing API Tutorial ([tutorial](https://help.shopify.com/api/tutorials/adding-billing-to-your-app/))
10+
#### 02 - Adding billing to your app
11+
- Adding billing to your app ([tutorial](https://help.shopify.com/api/tutorials/adding-billing-to-your-app/))
12+
13+
## Requirements
14+
15+
* [Ruby](https://www.ruby-lang.org/en/documentation/installation/) (sample apps were written with Ruby 2.2.1)
16+
* [RubyGems](https://rubygems.org/pages/download), the package management tool for Ruby
17+
* [Bundler for Ruby](http://bundler.io/), a dependency manager
18+
19+
## Installation
20+
21+
* Download the sample code from the [this repo](https://github.com/Shopify/example-ruby-app)
22+
* To get the necessary dependencies, navigate to the application folder and type `bundle install`
1223

1324
## Credentials
1425

15-
This example uses a `.env` file to store the application credentials. After cloning the repository, you'll need to create a file named `.env` in the same folder of the tutorial. The contents of the file should be as follows:
26+
To create a public app and retrieve your API credentials, sign up for a [Shopify Partners account](https://app.shopify.com/services/partners/auth/login) and [follow this guide](https://help.shopify.com/api/guides/api-credentials).
27+
28+
This tutorial series uses a `.env` file to store application credentials. For each installment in the series there is a corresponding app directory and `app.rb` file. When following the tutorials, make sure the app directory includes a `.env` file with contents as follows:
1629
```
1730
API_KEY=YOUR_API_KEY
1831
API_SECRET=YOUR_SECRET_KEY
1932
```
2033

2134
where `YOUR_API_KEY` and `YOUR_SECRET_KEY` are the values of your application's API key and secret key respectively.
2235

23-
To retrieve your API credentials, sign up for a [Shopify Partners account](https://app.shopify.com/services/partners/auth/login) and [follow this guide](/api/introduction/getting-started).
36+
## App URL
37+
38+
This tutorial series using [ngrok](https://ngrok.com/) to create a secure tunnel from the public Internet to your local machine. For each installment in the series, you will need to copy the `APP_URL` generated by ngrok to your `app.rb` file. Additionally, the `APP_URL` needs to be added to the **App URLs** section of your public app settings. These procedures are covered in part one of the tutorials.
2439

25-
## Running the app
40+
## Running the apps
2641

27-
1. Create the `.env` file as described above.
28-
2. `bundle install` to obtain all of the necessary dependencies
29-
3. `ruby app.rb` to run the example application.
42+
Each installment of the tutorials includes an app.rb file inside the app directory. To initialize an app, navigate to the correct app directory in terminal and then run `ruby app.rb`.

0 commit comments

Comments
 (0)