Is it suggested to use a certain dependency injection container with nakama or prevented?

hi.

i like to structure the code of my Nakama backend plugin the way I like. Does Nakama have limitations about certain libraries(di or others) to use, or can I use any other library with Nakama? Or is there any other library suggested for a certain task?

Hello @virtouso,

The limitations depend only on the runtime being used - for the JS runtime you need to be mindful that the server environment is not a Node environment, so Node or browser dependent JS libs may not be compatible.

You also need to be mindful that the Lua and JS runtimes are sandboxed, and run in separate VMs, which means that you can’t have global shared state between separate requests or matches.

Otherwise I don’t see issues with using any DI framework of your liking.

Best.

2 Likes