尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗[!NOTE] Remix is now React Router. As of React Router v7, Remix and React Router have merged.
For new projects, use the Shopify App Template - React Router instead.
To migrate your existing Remix app, follow the migration guide.
This is a template for building a Shopify app using the Remix framework.
Rather than cloning this repo, you can use your preferred package manager and the Shopify CLI with these steps.
Visit the shopify.dev documentation for more details on the Remix app package.
Before you begin, you'll need the following:
npm install -g @shopify/cli@latest
shopify app init --template=https://github.com/Shopify/shopify-app-template-remix
shopify app dev
Local development is powered by the Shopify CLI. It logs into your partners account, connects to an app, provides environment variables, updates remote config, creates a tunnel and provides commands to generate extensions.
To authenticate and query data you can use the shopify const that is exported from /app/shopify.server.js:
export async function loader({ request }) {
const { admin } = await shopify.authenticate.admin(request);
const response = await admin.graphql(`
{
products(first: 25) {
nodes {
title
description
}
}
}`);
const {
data: {
products: { nodes },
},
} = await response.json();
return nodes;
}
This template comes preconfigured with examples of:
Please read the documentation for @shopify/shopify-app-remix to understand what other API's are available.
This template uses Prisma to store session data, by default using an SQLite database.
The database is defined as a Prisma schema in prisma/schema.prisma.
This use of SQLite works in production if your app runs as a single instance. The database that works best for you depends on the data your app needs and how it is queried. You can run your database of choice on a server yourself or host it with a SaaS company. Here's a short list of databases providers that provide a free tier to get started:
| Database | Type | Hosters |
|---|---|---|
| MySQL | SQL | Digital Ocean, Planet Scale, Amazon Aurora, Google Cloud SQL |
| PostgreSQL | SQL | Digital Ocean, Amazon Aurora, Google Cloud SQL |
| Redis | Key-value | Digital Ocean, Amazon MemoryDB |
| MongoDB | NoSQL / Document | Digital Ocean, MongoDB Atlas |
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗