Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    Node v.14 and/or ES2020

    Cloud Backend (Cloud DB, API Builder)
    5
    10
    943
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Daniel Mulroy
      Daniel Mulroy last edited by

      Hello team,

      Can you tell us where Node 14 is on the roadmap?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Joseph Benguira
        Joseph Benguira last edited by

        Hey Daniel,

        since we use AWS Lambda under the hood, we are waiting for AWS to add it and we will get it the same day on AppDrag Cloudbackend 🙂

        You can check this page for more details about supported Node.js versions:
        https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html

        Based on the latest update for Node 12, (https://aws.amazon.com/blogs/compute/node-js-12-x-runtime-now-available-in-aws-lambda/)
        There is a 6-7 months delay between on official LTS release of node and it's availability on AWS Lambda

        1 Reply Last reply Reply Quote 2
        • J
          jbenguira last edited by

          Great news, Node.js 14 is now available on Cloudbackend, more details are available here:
          https://changelog-8f2785.appdrag.com/features/nodejs-14-serverless

          1 Reply Last reply Reply Quote 2
          • Daniel Mulroy
            Daniel Mulroy last edited by

            Hi @Joseph-Benguira and @Wassim-Samad thank you very much.

            Can you please update the prettier/magic wand function to support the new Syntax ? It broke my code when I tried to use it 🙂

            Thanks!

            Wassim 1 Reply Last reply Reply Quote 1
            • Wassim
              Wassim last edited by

              Hi, Added to the tasklist

              1 Reply Last reply Reply Quote 0
              • T
                Thomas D last edited by Thomas D

                I'm getting "Error: Invalid URI: The Uri string is too long.", but I'm not even near the new 8k URL limit on requests in Node.js.

                Is this a problem on the returned body as well? (I'm using RAW)

                UPDATE:
                When i manually test the Lambda it runs just fine, so it seem the amount of HTML that's returned to the front-end is what's causing the issue.

                The payload is 216 Kbyte

                UPDATE2:
                The biggest payload I could run is 100 Kbyte

                How can I fix this? We're rendering e-commerce so html this size is very common!

                1 Reply Last reply Reply Quote 0
                • Joseph Benguira
                  Joseph Benguira last edited by

                  Hey Thomas,
                  The amount of data you can return with a lamda is 5MB

                  So I guess the error is in your code, you should publish your source code for more details

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    Thomas D @Joseph Benguira last edited by Thomas D

                    @Joseph-Benguira

                    It's not the code, I tried by just returning the object in the handler, like so:

                    {
                      "Table": [
                        {
                          "id": 1,
                          "htmlCode": "HTML-PAYLOAD",
                          "titleHtml": "<title>Title</title>",
                          "descriptionHtml": "",
                          "title": "Title",
                          "description": "",
                          "canonicalUrl": "https://testUrl.company.com",
                          "ogTagsHtml": "",
                          "jsonLDHtml": "",
                          "lastUpdated": 1619438631193,
                          "metaTitle": "Title",
                          "metaDescr": "",
                          "cssFiles1": "CSS-URL",
                          "menuHtml": "MenuHTMLHere"
                        }
                      ]
                    }
                    

                    (Based on your Dynamic Datasource example which returns the table)
                    I've verified that the payload is valid JSON escaped HTML too.

                    And as I mentioned, the Lambda runs just fine - but it cannot be inserted to the page without getting the error.

                    As soon as I lower the payload size (amount of products) then it works again.

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jbenguira @Thomas D last edited by

                      @ThomasD it seems you should maybe not use a datasource for your use case, an api endpoint returning directly the final page would be better, combined with url rewriting that could be a great solution

                      Also you have not provided any url or code so it's impossible to investigate this

                      1 Reply Last reply Reply Quote 0
                      • Wassim
                        Wassim @Daniel Mulroy last edited by

                        @Daniel-Mulroy Hi, we updated the beautifier library. Should work fine for you now.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post