You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository is home to the code examples highlighted in various [Shopify API tutorials](http://docs.myshopify.io/api/tutorials/). They are designed solely for the purposes of introducing new developers to the Shopify API. This apps are written in [Sinatra](https://github.com/sinatra/sinatra), but the concepts presented will also apply to developers building applications in other languages such as Python, Node.js and PHP.
3
+
This repository is home to the code examples highlighted in various [Shopify API tutorials](http://docs.myshopify.io/api/tutorials/). They are designed solely for the purposes of introducing new developers to the Shopify API. The example apps are written in [Sinatra](https://github.com/sinatra/sinatra), but the concepts presented will also apply to developers building applications in other languages such as Python, Node.js and PHP.
4
4
5
5
## Tutorial index
6
6
@@ -13,19 +13,15 @@ This repository is home to the code examples highlighted in various [Shopify API
13
13
## Requirements
14
14
15
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
16
*[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`
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).
21
+
Follow [this guide](https://help.shopify.com/api/guides/api-credentials#generate-public-app-credentials) to obtain your public app credentials from your Shopify Partners account.
22
+
23
+
This example apps use a `.env` file to store app credentials. After cloning the repository, you will need to create a file named .env in the same folder of the tutorial. Copy the values of the API Key and API Secret from your partner dashboard, and add them to the .env file in the following format:
27
24
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:
29
25
```
30
26
API_KEY=YOUR_API_KEY
31
27
API_SECRET=YOUR_SECRET_KEY
@@ -35,8 +31,17 @@ where `YOUR_API_KEY` and `YOUR_SECRET_KEY` are the values of your application's
35
31
36
32
## App URL
37
33
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.
34
+
This tutorial series uses[ngrok](https://ngrok.com/) to create a secure tunnel from the 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 the [Building a public Shopify application](http://docs.myshopify.io/api/tutorials/building-public-app/#configure-app) tutorial.
39
35
40
-
## Running the apps
36
+
## Running the app
41
37
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`.
38
+
```sh
39
+
# navigate to the correct tutorial
40
+
$ cd 01\ Getting\ Started/
41
+
# create the .env and copy your API key and API secret values
0 commit comments