Removing all database access capability from rails 5.x client app

43 Views Asked by At

I am still fairly new to ruby and Ruby on Rails framework.

Rails --api only project is great for just getting into bare bones rest API development without any of the unneeded extras.

I would always build a web API app to handle my data access and domain logic. I would create a separate rails app for the front end web client. Maybe this seperation of tiers is not always necessary for small or 'pet' projects but I prefer this architecture.

I am trying to find the best way to remove the data access related code and gems from my client project as I will never access the database.

Is there aclean way to do this automatically in a similar way that --api switch includes only things relevant to API app?

It's not the end of the world doing this manually but it would be nice if I could write a bash script that I can pass a project name and it would build me 2 shell projects - 1 API, 1 client - with only the things I would usually need at each level.

Any suggestions about this are greatly appreciated.

Thanks in advance!

0

There are 0 best solutions below