How to Separate client and server processes on Node Shopify App?

Alex-Miller
Excursionist
18 2 4

Hello! 

  I'm new to this and using the https://github.com/shopify/shopify-app-node/ package.

When i'm working on client code, the realtime refresh is quite fast. However when I update the koa server code, it takes 30+ seconds to refresh the app every time i save it. 

I think i should be able to rectify this by starting the services separately...

the index.js is quite confusing though:

```

require('@babel/register')({
presets: ['@babel/preset-env'],
ignore: ['node_modules']
});

// Import the rest of our application.
module.exports = require('./server.js');
```
Not sure what this does or why it's setup like this. 
 
in the package.json i changed
`"dev": "cross-env NODE_ENV=development nodemon ./server/index.js --watch server",`
to 
`"dev": "cross-env NODE_ENV=development nodemon ./server/server.js --watch server",`
 
but then i get a bunch of errors related to modules that I was unable to fix.
 
love everyone's help
AIMHUGE GROWTH CONSULTING
Alex@aimhuge.com
0 Likes