Routing enable in server.js??

Highlighted
New Member
7 0 0

How do we redirect the app to a different page when we load the installed app from the store. I am fine with afterauth ctx.redirect  to index.js after app installation.  But my requirement is to redirecwhen to Dashboard when ever we try to access the app from the store. I am using shopify using node and react official tutorial using node and react

I tried this 

 

app.prepare().then(() => {
  const app = new Koa();
  async function redirect (ctx, next) {
    
    console.log('ctx',ctx);
    ctx.redirect('./Dashboard');
    
   
  }

 

Can we solve this?

0 Likes