Unable to test Freshdesk First Serverless App locally

Description of the challenge:

I am not able to test Freshdesk First Serverless App (as created from FDK CLI). I have exactly reproduced the steps as given in the Quick Start docs, but there is no result on the console (i.e. Windows Powershell in local system) (the result is supposed to be console.log('Hello ’ + args[‘data’][‘requester’][‘name’]); )
This is my third day learning FDK but I am not new to JS or app development.

This is the default code of server.js file, removed the comments:

exports = {

  events: [
    { event: 'onTicketCreate', callback: 'onTicketCreateHandler' }
  ],

  onTicketCreateHandler: function(args) {
    console.log('Hello ' + args['data']['requester']['name']);
  }

};

Hi @manas,
Welcome to the Developer Community :tada:

Can you please paste the error message you are getting? Also, can you please share the manifest file here?

2 Likes

Hi @ManiDeepak_Vandrangi
Thanks
There is no error message. The app is supposed to print on console “Hello Manas Mutreja” whenever a Ticket is created (onTicketCreate event) but I am not getting any output.

Here is the Manifest file:

{
  "platform-version": "2.0",
  "product": {
    "freshdesk": {}
  }
}

Hey @manas

Just a clarification, are you trying to invoke the onTicketCreate event from the simulation screen in http://localhost:10001/web/test or creating a new ticket in the portal to trigger the event?

because to test the app locally the event has to be invoked manually from the simulation screen, creating a new ticket in the portal will not work in this case

Hope this helps!

Stay safe :slight_smile:

4 Likes

Thanks @velmurugan

That was the exact problem.

1 Like