n```elm\\nport saveToDB : String -> Task Json.Decode.Value Int\\n```\\n\\nIn JavaScript you can define the task port implementation like so:\\n\\n```js\\nconst { Gren } = require('./app.js');\\n\\nGren.Main.init({\\n  taskPorts: {\\n    myTaskPort: async function(str) {\\n      return str.length;\\n    }\\n  }\\n})\\n```\\n\\nTask ports must be implemented as async functions, or functions returning promises on the JS side. If anything goes wrong,\\nlike an exception being thrown, it will be represented as a