First of all, Thank you for this amazing project.
I am using Shopify CLI to run this app. Everything is working fine. Installs properly, but doesn't work after app finishes installing. Stucks at Cannot Get / . Here's an image that supports the claim.
The problem is there is no Vite middleware that gets attached to the express on the index route (as app gets redirected to home page after installation is finished)
I tried working on that but no luck.
Can you fix this issue or find a way to get a roundabout?
Here's the vite config file.
const viteConfig = defineConfig({
define: {
"process.env.SHOPIFY_API_KEY": process.env.SHOPIFY_API_KEY,
appOrigin: process.env.HOST.replace(/https:\/\//, "")
},
plugins: [react()],
build: {
outDir: "../dist/client/",
},
root: dirname(fileURLToPath(import.meta.url)),
resolve: {
preserveSymlinks: true,
},
server: {
host: "localhost",
port: VitePort,
hmr: hmrConfig,
proxy: {
// Routes are kept separate on purpose
"^/auth(/|(\\?.*)?$)": proxyOptions,
"^/apps(/|(\\?.*)?$)": proxyOptions,
"^/proxy_route(/|(\\?.*)?$)": proxyOptions,
"^/graphql(/|(\\?.*)?$)": proxyOptions,
"^/webhooks(/|(\\?.*)?$)": proxyOptions,
"^/gdpr(/|(\\?.*)?$)": proxyOptions,
},
},
});
P.S: I am not entirely following setup.md as you suggested, but I am sure I have added the necessary configuration. I am using shopify app serve
command