Sharing Server Actions between projects

Just wanted to check if this was actually possible before i do it, but I often seem to find myself making the same or very similar server actions over and over again, on almost every project I have done. Is it possible for me to just go and copy the server actions from the api path, and paste them into my new project, then adjust the connection settings and be able to use it in my new project.

I am unsure if certain server actions add bits to the config file or any other place, so I would rather not do it if it is going to cause a problem I am unaware of.

I often do this, without any problems.

1 Like

Thanks Tom, I wonder if that means we could share server actions amongst the community, if we remove the private information?

Yes, I think we could. However the more complicated server actions would probably be too solution-specific to be of general interest; the simpler ones are more likely to be generic and generally applicable, but probably also quite simple to create from scratch. Having said that, I copy and paste basic CRUD action files for example, for my own purposes, so perhaps you have a point. In any case, I’m always interested to see examples which appear on this forum - in discussions and screenshots etc.

1 Like

That’s why i suggested some time ago that there be a “default connection” defined in the target so server actions could be truly portable, just share with the connection set to “default”

1 Like

I don’t see how this would make much difference to the ease or otherwise of sharing server connect files. I would have thought the main issue was the database schema used in the server connect file which was to be shared.