MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Testing my module, it is stuck loading

    Scheduled Pinned Locked Moved Solved Troubleshooting
    31 Posts 2 Posters 8.3k Views 2 Watching
    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.
    • L Offline
      l0zarus @sdetweil
      last edited by

      @sdetweil

      I added let header = “” and let cors_url = jdhflrkgd. I did not add anything else at all.

      exact code below:

              let header = "";
      
              // this is the API call url
              let original_url = "http://api.seatgeek.com/2/events?lat=" + self.config.latitude + "&lon=" + self.config.longitude + "&per_page=" + self.config.eventCount + "&datetime_utc.gte=" + today + "&datetime_utc.lte=" + oneweek + "&range=" + self.config.range + "&type=concert" + "&client_id=" + self.config.clientID + "&client_secret=" + self.config.clientSecret;
              
              // this is the cors URL
              let cors_url = "http://" + config.address==="0.0.0.0"?"localhost":config.address + ":" + config.port + "/cors?" + header + "&url=" + original_url;
          
              // fetching the data from seatgeek
              fetch(cors_url)
      
      S 1 Reply Last reply Reply Quote 1
      • L Offline
        l0zarus @sdetweil
        last edited by

        @sdetweil

        strange… I just found the following code at the top of my file. I did not add it there. Going to delete it now.

        const config = require("../../config/config");
        
        1 Reply Last reply Reply Quote 1
        • S Offline
          sdetweil @l0zarus
          last edited by

          @l0zarus said in Testing my module, it is stuck loading:

          config.address===“0.0.0.0”?“localhost”:config.address

          oops
          need parens around that…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          L 1 Reply Last reply Reply Quote 1
          • L Offline
            l0zarus @sdetweil
            last edited by

            @sdetweil aha!!! This did it! It’s ugly but it is working… now to spend time improving the design of the table and make my code more effective.

            THANK YOU SO MUCH! I will probably be back with more questions, but not around this issue.

            S 1 Reply Last reply Reply Quote 1
            • S Offline
              sdetweil @l0zarus
              last edited by

              @l0zarus woohoo… thx for the feedback

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 3
              • 4
              • 4 / 4
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy