Uplink codes in Anvil's project Server Code group

I am working on an app using some uplink code running on my own computer as server side code.
It’s been several days I’m working on it and until today, it was running fine.

Today, I’ve got an error because of missing 3rd party lib and as I looked it it turned out that all of my uplink codes appeared under the project’s Server Code.

I’m confused.

Over a week now, I’ve not seen these codes there. I only run them on my own computer locally. Yesterday, I merged and committed my codes from my computers into the same git repository (under server_code subfolder) my server side codes. So now I have my code synced on both side, within Anvil and in my local directory. I assume this caused it to appear within my Anvil’s project page.

Currently my app broken because my server codes (uplink) cant run within Anvil server due to missing 3rd party libs. Before I would fix this with adding any dependency, I would like to understand what and why is this happens.

My intention was to keep the code in my own servers, but I might move them later into Anvil’s server side. I have to connect to my local DB which is much easier with running my own code locally atm. (later I will move these codes and DB to a dedicated server, that would be a different issue then)

Can someone explain to me, when and why showing up my own uplink code within the server codes in Anvil’s project and how can I choose between running them within Anvil’s server or only on my own PC like before?

Thanks!

If you add a .py file to the server_code folder, the app will consider it part of the server side app and load it.

If you want it to be part of the repository without the server loading it, try to create a new folder with a different name, so the app will ignore it.

2 Likes