Is posible using typescript in moralis-cli cloud functions

this is my code inside cloud.ts:

import LM from ‘./LM’;

const Moralis = require(‘moralis’);


Moralis.serverURL = ‘xx’

Moralis.Cloud.define(“lmAnalisys”, async (request) => {

const result =new LM(request.params.imaginaryPartY, request.params.imaginaryPartX, undefined, 5, undefined, undefined, undefined, undefined, undefined, undefined).fit();

return {





so then in terminal i do:

moralis-admin-cli watch-cloud-folder --moralisApiKey xxx–moralisApiSecret xx–moralisSubdomain --autoSave 1 --moralisCloudfolder cloud.ts

  • Listening folder: cloud.ts <---- and stay here for a long time…

this is possible?

my doub is if i can import external libraries and using it?

Someone was able to include external libraries in cloud code, but he did a build with vercel ( before uploading a single java script file. For now there isn’t a native support for external libraries in cloud code, the plan is to have that support for external libraries in the future.

1 Like