Hey! I'm pretty inactive in the factorio scene right now but this is a simple question so-
You can write data/prototype stage lua code as if you were making a mod, and put it into the mod settings and it will get executed during startup. The reason to use this method instead of just making a regular mod is that mod settings are synced between worlds as well as host(or dedi servers) and clients. While you can publish a regular mod to the portal to get the same effect, this avoids the publication step.
The downside is to ensure compatibility with the settings system, I've enforced encoding the input (which has the benefit of being able to compress it as well). An encoder is included in the mod zip, usage instructions are on the overview page. It's encoded as base64 over DEFLATE on the input.