Skip to content

29next/example-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Server to Server App

This app is intended as a demonstration of how to use the 29 Next App Framework in a "server to server" context.

Features

How to Setup

This app uses Django, you can follow Django install guides to ensure you have Python in your local environment.

Create App In Partner Account

The first step is to create an App in your 29 Next Partner Account. You'll need your app Client ID and Client Secret later on in the setup process.

Install Dependencies

pip install -r requirements.txt

Setup Public Tunnel

To access your localhost for app development, you can use Ngrok or LocalTunnel to create and open a public tunnel to your local machine.

Environment Variables

Variable Description
APP_DOMAIN Your domain when running the app (ie your public tunnel url).
CLIENT_ID Your App Client ID found in your partner account.
CLIENT_SECRET Your App Client Secret found in your partner account.

To run this Django project, you'll need to set environment variables with your local app domain, app client id and client secret (from your 29 Next app).

export <VARIABLE>=<VALUE>

Run Django App

To run the Django app on your local, use the following command.

Django port needs to match the public tunnel port.

python manage.py runserver 0.0.0.0:<PORT>

Setup App

To set up your App in the platform, you need to configure and push your app. See Example App Files

App Files

├── config.yml
├── manifest.json
└── snippets
    └── checkout-message.html

With your configured manifest.json and config.yml, you can now build and push your app to your account.

nak build && nak push

Push Your App

You can now use App Kit to create your App Manifest to your partner account and link your development store to your app.

Install on Development Store

You can now connect your app to your development store which will initiate the Oauth setup flow and configure Admin API access. 🎉

About

Example Server to Server App using 29 Next App Framework

Topics

Resources

Stars

Watchers

Forks