• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.3k 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.
  • T Offline
    tataille
    last edited by Jun 24, 2016, 1:51 PM

    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
    • K Offline
      KirAsh4 Moderator
      last edited by Jun 24, 2016, 4:45 PM

      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?

      T 1 Reply Last reply Jun 24, 2016, 4:47 PM Reply Quote 0
      • T Offline
        tataille @KirAsh4
        last edited by Jun 24, 2016, 4:47 PM

        @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
        • K Offline
          KirAsh4 Moderator
          last edited by Jun 24, 2016, 4:50 PM

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

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

          T 1 Reply Last reply Jun 24, 2016, 4:53 PM Reply Quote 0
          • T Offline
            tataille @KirAsh4
            last edited by Jun 24, 2016, 4:53 PM

            @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
            1 / 1
            • First post
              2/5
              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