Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Accessing global variable or node module in Windy API

    Windy API v4
    2
    4
    735
    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.
    • B
      b.rochut | Premium
      last edited by

      Hi everyone,

      I'm developing a NodeJS app and visualizing a windy map through the API.

      In my WindyInit function I want to have access to a parameter in my MongoDB Database.

      To do that I wanted to require('mongoose') or require('mongodb') in the WindyInit function but it's not working. I know these are NodeJS modules but I'm using Browserify to get a working js script displaying the map.

      The other solution I tried was to access a global variable written in my HTML (script JS just before the div of the windy map) in my windyInit function but once again I don't know how to do that...

      Does someone have a solution ?

      Thanks a lot,
      Basile

      KorinaK 1 Reply Last reply Reply Quote 0
      • KorinaK
        Korina @b.rochut
        last edited by Korina

        @b-rochut Hello, using Windy API in an app falls under special conditions, please read our Terms of Use.

        Korina

        B 1 Reply Last reply Reply Quote 0
        • B
          b.rochut @Korina | Premium
          last edited by

          @korina Hi Korina, thanks for answering.

          What do you mean by special conditions ?
          Do you mention the 3.1.2 about private development and private application ?
          I'm only using it for myself on a private app if that's the question.

          Basile

          KorinaK 1 Reply Last reply Reply Quote 0
          • KorinaK
            Korina @b.rochut
            last edited by

            @b-rochut Windy API shall not be used on an app or website, that is weather oriented, since it does not create any added value.
            If you are using it for your own private project, it does not violate our ToU.

            Korina

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
            NodeBB & contributors, OSM & contributors, HERE maps
            Terms of Use     Privacy Policy