Solved

Default route with node embedded app

jvs1992
Visitor
3 0 0

I am working on an embedded Node application using the default boilerplate code that Spotify provides. The app is able to run and defaults to the `pages/index.js` react template and renders it on the page.

 

At this point it is very unclear how this routing actually happens. I am guessing that this happens within the App Bridge or one of these other tools. I attempted to go through the documentation for App Bridge, Polaris, etc but have not really found any answers to how this works or how to configure this. 

 

Could anyone provide any insights?

Accepted Solution (1)

lizk
Shopify Staff
246 58 72

This is an accepted solution.

Hi 👋

The code generated by the Shopify CLI is currently using the Next.js framework.

This framework uses a File System based router.

So when a file is added under the Pages directory is is available as a route. 

You can learn more about the routing in the Next.js documentation

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

lizk
Shopify Staff
246 58 72

This is an accepted solution.

Hi 👋

The code generated by the Shopify CLI is currently using the Next.js framework.

This framework uses a File System based router.

So when a file is added under the Pages directory is is available as a route. 

You can learn more about the routing in the Next.js documentation

To learn more visit the Shopify Help Center or the Community Blog.

jvs1992
Visitor
3 0 0

Exactly what I was looking for. Thank you!