Back

[SOLVED] TypeScript Functions

  • 0
  • Functions
NoFr1ends
16 Apr, 2023, 00:04

I'm curious whats the proper way to deploy functions which are written in TypeScript. Currently I manually build the project and than deploy it. Ideally I would think that I should add the build folder where I put the result of typescript should be excluded too and instead be build while deploying the function? Also I can't find proper types for the runtime request and response.

TL;DR
Solution: Currently, in Appwrite Functions, you have to manually build your TypeScript project before deploying it. However, in the next version, there will be an option to specify build commands to automate this process. In the meantime, you can take a look at this project on GitHub that provides TypeScript functions as an example: <https://github.com/stnguyen90/places> As for the proper way to deploy TypeScript functions, you should exclude the "build" folder where the TypeScript results are stored. Instead, the build process should be handled during deployment. Regarding the types for the runtime request and response, it seems that they are
Drake
16 Apr, 2023, 00:22

For now, you'll have to build before deploying. In the next version of Appwrite Functions, we plan to let you specify build commands so that you can tell Appwrite how to build the function after deploying.

Take a look at this project that has typescript functions: https://github.com/stnguyen90/places

NoFr1ends
16 Apr, 2023, 00:26

Okay I thought I missed something, but awesome to hear that it's planned for the next version of functions, thanks

NoFr1ends
16 Apr, 2023, 00:29

[SOLVED] TypeScript Functions

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more