Monday 28 September 2020

Is it okay to keep the server's and client's dependencies together in one package.json?

I want to make a Nuxt app with a backend in Express. I want to keep the front and backend separate with separate dependencies, because there will obviously be some packages that are only used on one end (ex: sequelize). I tried to find ways to achieve this, but it seems that the main solution is to use serverMiddleware from Nuxt, which will have the express-server.js with the same dependencies as Nuxt.Basically, what I want is Nuxt and Express separate, but hosted on the same server (this way I won't need CORS), but I was having trouble finding out how to do this. Most tutorials say that the server and client will share the same package.json, but I don't think this is the best method

Submitted September 29, 2020 at 06:14AM by pyboy10000

No comments:

Post a Comment