# Run Code in Services

**URL:** <https://community.appfarm.io/t/run-code-in-services/1918>\
**Category:** Ask the community\
**Created:** [June 26, 2025, 12:25pm UTC](https://community.appfarm.io/t/run-code-in-services/1918 "2025-06-26T12:25:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SinanMaric](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/sinanmaric/32/1226_2.png) [@SinanMaric](https://community.appfarm.io/u/SinanMaric)\
**Post date:** [June 26, 2025, 12:25pm UTC](https://community.appfarm.io/t/run-code-in-services/1918/1 "2025-06-26T12:25:08Z")

</div>

Hi,

I wish to use Run Code in Services and use external libraries in Services. Is this possible? I cannot seem to find Run Code among the action nodes.

---

<div class="post-metadata">

**Author:** ![emma](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/emma/32/1649_2.png) [@emma](https://community.appfarm.io/u/emma)\
**Post date:** [June 26, 2025, 1:00pm UTC](https://community.appfarm.io/t/run-code-in-services/1918/2 "2025-06-26T13:00:45Z")

</div>

Hi!

The option to use Run Code and external libraries in Services is not possible. This is due to a 2-second timeout we’ve put in place to prevent heavy workloads and reduce the risk of platform misuse.

Additionally, supporting external libraries would significantly increase the potential for security vulnerabilities, so we’ve chosen to keep things restricted.

---

<div class="post-metadata">

**Author:** ![SinanMaric](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/sinanmaric/32/1226_2.png) [@SinanMaric](https://community.appfarm.io/u/SinanMaric)\
**Post date:** [June 27, 2025, 8:07am UTC](https://community.appfarm.io/t/run-code-in-services/1918/3 "2025-06-27T08:07:03Z")

</div>

Okay, because this was registered as a challenge 2 years ago, and we need it because we have a lot of critical functionality in Services.

But for the meanwhile, do you have any tips for using spatial indexing? Currently I am using the RBush JavaScript library for 2D spatial indexing of points and rectangles. But this cannot be used in Services. The reason is that I need a high performance way of iterating large data sources.

---

<div class="post-metadata">

**Author:** ![kristian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/kristian/32/58_2.png) [@kristian](https://community.appfarm.io/u/kristian)\
**Post date:** [June 27, 2025, 8:25pm UTC](https://community.appfarm.io/t/run-code-in-services/1918/4 "2025-06-27T20:25:00Z")

</div>

Hi!

I believe that experience is quite limited. Note that javascript _can_ be used in services when the whole library is bundled into the run code / function in services.

The challenge / wish of freely adding third party libs in services has not been done, as we are uncomfortable with the potential security risks that may impose in a shared cluster environment - and bundling is still an option (or to host an external microservice yourself).
