Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    1. Home
    2. Daniel Mulroy
    • Profile
    • Following 1
    • Followers 2
    • Topics 56
    • Posts 271
    • Best 82
    • Groups 0

    Daniel Mulroy

    @Daniel Mulroy

    Hello - I'm a French - American technical founder. I've started two businesses in California, and am starting my third in Paris.

    120
    Reputation
    34
    Profile views
    271
    Posts
    2
    Followers
    1
    Following
    Joined Last Online
    Website www.goodvibes.news Location Paris, France

    Daniel Mulroy Unfollow Follow

    Best posts made by Daniel Mulroy

    • Blog Search Box

      Hello everyone - I've made my own search box and I'm sharing the code here.

      Features:
      Searches your blog title and subtitles for the user inputted keywords. If it matches the title, return it. If it matches the sub title (meta description) of the blog post, label it with a special indicatory, like "(related)".

      Automatically opens a new tab towards that blog post when selected.

      Demo:
      https://www.visigo.fr/blogsearch.html

      Three steps:

      Step 1 (Setup):

      a) Add a simple "Searchable List" component to your page.
      Screen Shot 2020-11-30 at 10.31.03 PM.png

      b) Give that Searchable List component an identifier (I recommend "blog-search" - you will have less settings to change later)
      Screen Shot 2020-11-30 at 10.35.34 PM.png

      c) Add a "jQuery Source Code" object to your page.
      Screen Shot 2020-11-30 at 10.33.56 PM.png

      d) Add some blog posts if you don't have any:)

      Step 2:
      Open the jQuery Source Code, replace EVERYTHING by pasting this code.
      You MUST modify the first two parameters or else it will not work. You must also modify the BLOG_SEARCH_SELECTOR and BLOG_SEARCH_LANGUAGE to reflect your actual use case.

      Step 3:
      Save your page, load it up and try it out!

      If you want to change the action taken after the user selects an option, modify line ~48 "window.open(data.url)" and change it to whatever you'd like.

      Additional info:

      • This does not allow you to search categories or tags. This could theoretically be implemented, but I'd need your help to understand the best use cases.

      • Accented characters:
        I've decided to disregard accented characters when making the comparison. This is to allow people to choose how they search for topics, especially if they are searching in a language that is not the default one on their keyboard. The details of how this is processed is in the removeDiacritics function.

      • FYI, AppDrag's blog API returns the results in this format, which you can access using the data variable returned after user selection:

      {
                  "id": "9", // Integer of the blog post ID number
                  "appID": "your-app-id",
                  "title": "The Title of your Blog Post",
                  "subTitle": "The meta description of your Blog Post",
                  "imageUrl": "uploads/url-of-your-blog-photo",
                  "tags": "blog-post-tags",
                  "category": "[\"4\",\"5\"]", // Blog post categories as JSON stringified array
                  "author": "John Doe",
                  "nbReads": "152",
                  "previewID": "b2b6bxd2-exxe-480c-abf4-a2908s2b4829", // GUID of blog preview ID
                  "totalRead": "152",
                  "isPublished": "True",
                  "PublishDate": "2020-10-20 09:34:05",
                  "formattedDate": "20 octobre, 2020",
                  "lastUpdate": "2020-08-31 13:56:39"
              }
      
      posted in How-to
      Daniel Mulroy
      Daniel Mulroy
    • RE: AppDrag Security

      Hi Dick,

      (Disclaimer, I'm not an AppDrag representative, just a user and fan, but my opinions are my own)

      The AppDrag Whitepaper has some good information about their own security.

      But, part of the AppDrag's power in allowing you to design and build your own 'back-end' to a site is giving you the flexibility how much (or how little) security you need.

      In this sense, it's almost as if you are renting a storefront in a mall. The mall (AppDrag) mops the floors, maintains the public restrooms, manages the parking lot, etc.

      But you have to decide what kind of door and what kind of locks you put on or in your store.

      AppDrag prevents 'unauthorized' access in the default state. Meaning, nobody can change your website or access your data directly.

      However, as soon as you start using their tools to build other ways of accessing the data, the responsibility for security falls under your scope.

      For example, if you build an API function to access confidential or private data, you should also build-in tests or checks to ensure that the API caller is authorized to access that information.

      This is obviously part of a much larger conversation about application security in general, but I wanted to get the ball started by defining and distinguishing the 'scopes' of your responsibility vs. AppDrag's.

      posted in General Discussion
      Daniel Mulroy
      Daniel Mulroy
    • RE: Slow loading blog

      Hi Julien,

      By using Chrome inspector / dev tools, it looks like your page is loading the same script from heyoliver 14 times! And each time it is taking between 2-6 seconds.

      See screenshots here:

      Screen Shot 2020-12-26 at 6.52.50 PM.jpg

      posted in Cloud CMS (Pagebuilder
      Daniel Mulroy
      Daniel Mulroy
    • RE: Upload Laravel App

      Hi Evan,

      I'm not with the @App-Drag team, nor am I a Laravel expert... but a quick check shows that Laravel is a PHP framework. AppDrag is a platform that hosts static HTML/JS/CSS files (+their API and DB backend, of course), but they do not support PHP.

      So, the short answer is no, I do not believe AppDrag would be compatible with an existing Laravel project, unfortunately.

      posted in How-to
      Daniel Mulroy
      Daniel Mulroy
    • RE: Sending html mail from API

      @Wassim said in Sending html mail from API:

      https://stackoverflow.com/questions/41412512/node-js-promise-request-return

      @Dick-Honing I've used the package 'request-promise-native' which allows you to await a request.

      I recommend checking it out, it's been working great for me:
      https://www.npmjs.com/package/request-promise-native

      posted in General Discussion
      Daniel Mulroy
      Daniel Mulroy
    • [Tutorial] Alternate Blog Article listing layout

      Hello all,

      My team asked me to figure out how to alternate the layout of the blog posts, so the image would go between being on the right, then the left.... and I wanted to share the code!

      Before:
      Screen Shot 2021-04-07 at 3.57.43 PM.png

      After:
      Screen Shot 2021-04-07 at 3.57.39 PM.png

      Steps:

      1. On the Blog Listing page, add a "CSS Source Code embedded object" above or below the Blog Listing element.
        alt text
      2. Copy/Paste the following into the CSS Source Code you just added (double click to open):

      Code:
      NOTE: This assumes you don't have any existing padding or margins set on your images or text div's.

          .appdrag-blog-listing .row {
              flex-flow: row;
          }
          
          .appdrag-blog-listing .row:first-child {
              /* Keeps the margin consistent between text and image */
              margin-right: 80px;
          }
          
          .blog-article-container:first-child .blog-article .row {
              /* Needed because the clearfix div messes with the :nth-child count */
              flex-flow: row-reverse;
          }
          
          .blog-article-container:not(.clearfix):nth-child(even) .blog-article .row {
              /* reverse even-numbered blog posts */
              flex-flow: row-reverse;
          }
      
      posted in Cloud CMS (Pagebuilder
      Daniel Mulroy
      Daniel Mulroy
    • RE: What is AI, PK, UQ when creating new column?

      Hello Thomas!

      These are SQL parameters.

      AI: Auto Increments the field on each new insertion
      PK: Primary Key - this is the field that will be used when doing joins (like linked fields)
      UQ: Unique - the SQL operation will fail it would cause two rows to have the same value in this column. This is best used for things like social security numbers, customer id numbers, and other things that are VERY IMPORTANT never to have conflict or duplicated.

      Hope this helps!

      @Wassim-Samad or @Joseph-Benguira, it'd be really nice to have these as tooltips.

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • RE: Retrieve visitor country code?

      In case you haven't found this out yourself yet, you can access it from within a CloudBackend function using:

      event["HEADERS"]["CloudFront-Viewer-Country"]
      

      Hope this helps!

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • RE: Is the AppDrag function name (or URL?) available from within an API Function?

      @Wassim said in Is the AppDrag function name (or URL?) available from within an API Function?:

      Seems a very good and practical way to do it. You can also manually define it in your API functions while setting sentry up no?

      Yes, I could, but I'm looking for reusable / template code I can copy/paste very quickly between functions and/or use in my template library... so I don't want to think about it each time, just want it to work every time 🙂

      For reference, here's my final code to get the function name both during testing "Try" in CloudBackend and also when the function is called 'normally':

      module.exports.getFunctionInfo = (event, context) => {
          let fInfo = {};
      
          // Try to extrapolate function info
      // sometimes the from-url is not available, so wrapping this in a try/catch block
          try {
              const httpMethods = ["GET", "POST", "PUT", "DELETE", "PATCH"];
              var functionHandle = event.HEADERS['from-url'].split('/').slice(-1)[0]; // Get from URL if it's been called from the web
              for (let method of httpMethods) { // Get from parameters if it's been called from "Try" method, because above method will not work. Could also ignore errors if running from Try Now as they are likely development errors....
                  if (event[method] && event[method].APPDRAG_FUNCTION_NAME != null) functionHandle = event[method].APPDRAG_FUNCTION_NAME;
              }
              fInfo.functionHandle = functionHandle;
          } catch (e) {
              fInfo.functionHandle = "";
          }
      
          fInfo.functionVersion = context.functionVersion;
          fInfo.functionName = context.functionName;
          return fInfo;
      };
      
      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • Tooltip/Explanation for response types

      Can we have more information (ideally, baked into the UI 🙂 about the response types for Cloud Backend functions?

      Screen Shot 2020-07-17 at 09.49.41.png

      posted in Features requests
      Daniel Mulroy
      Daniel Mulroy

    Latest posts made by Daniel Mulroy

    • Login cookie/session duration

      Hello Appdrag team,

      It's been months that I've noticed it feels like I'm logged out of Appdrag very often - at least once per week, if not twice.

      Did you change how the login authentication storage is handled? Is it related to restarting the browser/computer? Or something else?

      I do use it on multiple computers... does that 'reset' the token and invalidate the other computer? It didn't do that before.

      posted in General Discussion
      Daniel Mulroy
      Daniel Mulroy
    • Bug: Updating company columns when time field exists

      Hello team,

      Bug:
      When adding a column to a table with a time field that has an existing default value, the alteration fails.

      Expected behavior:
      It should work 🙂

      Problem:
      When rendering the default value for the time field, the number is formatted for humans. I.e. 110000 becomes 11:00:00 in the UI.

      However, when altering the table, your code is performing an UPDATE query that tries to set 11:00:00 as the default value for a TIME type column, which fails.

      Workaround:
      Manually editing 11:00:00 to 110000 before saving your changes to the table causes the update to succeed.

      @Joseph-Benguira

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • Rate limits and external sql databases

      I've seen the "connect an external database" feature in Cloud Backend.

      I do have a question (I suspect the answer is "yes" though...):

      Does the 1k API calls per minute apply?

      The reason I suspect yes is that we are still going through your endpoint... but I wanted to check 🙂

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • RE: Filtering by number of days ago not working?

      @joseph-benguira

      It's the dropdown menu found by clicking the "filter" button on CloudDB

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • Redirect web requests without a front-end plan?

      Hello team,

      I have a site where I've migrated the 'web' portion to another platform.

      However, I need to keep the CloudBackend.

      Can I cancel the front-end plan and still redirect web traffic to the new URL, without affecting API calls and files stored in the filesystem?

      posted in Cloud CMS (Pagebuilder
      Daniel Mulroy
      Daniel Mulroy
    • Filtering by number of days ago not working?

      Hello, we're using the following settings to try to build a view of items in our DB that have been published in the last 30 days (according to a field we set ourselves), and it doesn't seem to work.

      We've tried the option "Number of days ago" and "Number of days from now", (which I'm not sure what the difference is but neither work.

      Screen Shot 2022-12-14 at 4.12.11 PM.png

      The field type is "Date" in CloudDB :
      Screen Shot 2022-12-14 at 1.29.53 PM.png

      And we do have an episode which should 'match' :
      Screen Shot 2022-12-14 at 1.30.29 PM.png

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • Error with Appdrag.js after export

      Hello team,

      I've exported my project using the appdrag cli tool, but the appdrag.js file is failing to run as part of the exported project, with the following error:

      Uncaught SyntaxError: Identifier 'isInIframe' has already been declared
      

      Any ideas?

      posted in Cloud CMS (Pagebuilder
      Daniel Mulroy
      Daniel Mulroy
    • RE: Scheduled Function not running....?

      @joseph-benguira

      Solved... and I think I know why, very edge case 🙂

      I had a callback at the very end of my function handler, after a bunch of async/await stuff.

      Lambda has a context object:
      "callbackWaitsForEmptyEventLoop"

      From their docs:
      "Set to false to send the response right away when the callback runs, instead of waiting for the Node.js event loop to be empty. If this is false, any outstanding events continue to run during the next invocation."

      Anyway, removing the callback at the end of the function worked. I think lambda was executing the callback without waiting for the inner await'd functions to finish, which killed the running processes and prevented the updates from happening.

      Does "Try" run with a different context object than a scheduled function?

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • RE: Scheduled Function not running....?

      @jbenguira Sorry to report, I have removed "Require API Key" and set the recurrence to every 5 minutes, it is still not working.

      Screen Shot 2022-03-03 at 8.24.31 PM.png

      It says there are 172 executions today, which means it is probably running every 5 minutes... but the result of the function is not happening.

      Is there any difference in the execution environment between clicking "try" and running via Scheduler?

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy
    • RE: Scheduled Function not running....?

      Interesting. I have changed it to run at 2:05 AM, but here was the previous configuration, FYI. We will see if it starts working again 🙂 Thanks!

      Screen Shot 2022-02-17 at 3.06.59 PM.png

      posted in Cloud Backend (Cloud DB
      Daniel Mulroy
      Daniel Mulroy