MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Access to file system

    General Discussion
    2
    5
    1946
    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.
    • tataille
      tataille last edited by

      Hi,

      I would like to know if someone already tried to access (read/write) a file to store data. I need to store a token obtained by a first web call for future use. Any idea?

      Thanks

      1 Reply Last reply Reply Quote 0
      • KirAsh4
        KirAsh4 Moderator last edited by

        JavaScript can’t do that. You need a server-side process to do that for you. But if the token doesn’t (ever) change, you can hard code it in the JS and not have to write it to disk anywhere.

        A Life? Cool! Where can I download one of those from?

        tataille 1 Reply Last reply Reply Quote 0
        • tataille
          tataille @KirAsh4 last edited by

          @KirAsh4 .
          I found that node_helper could do the job. I found an example in the forum.

          I will give details if it works.

          Thanks for your reply

          1 Reply Last reply Reply Quote 0
          • KirAsh4
            KirAsh4 Moderator last edited by

            Exactly, that’s an external, server-side process.

            A Life? Cool! Where can I download one of those from?

            tataille 1 Reply Last reply Reply Quote 0
            • tataille
              tataille @KirAsh4 last edited by

              @KirAsh4 ha ok, sorry I not familiar with architecture. I already did a lot of widget for AtlasBoard for my company but I did not need to access fs.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy