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.

    Access to file system

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 2.4k Views 1 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.
    • tatailleT Offline
      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
      • KirAsh4K Offline
        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?

        tatailleT 1 Reply Last reply Reply Quote 0
        • tatailleT Offline
          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
          • KirAsh4K Offline
            KirAsh4 Moderator
            last edited by

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

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

            tatailleT 1 Reply Last reply Reply Quote 0
            • tatailleT Offline
              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 Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy