Read/write/browse files from client side *desktop* Meteor app? - node.js

(I am new to Meteor and NodeJs environments)
I would like to implement a Meteor-based webapp which needs to read/write/browse files on the client's local filesystem. I used the Meteor package arboleya:electrify to make the client side webapp a desktop app, with the hope of having the access rights to read the filesystem (because if Atom can do it, then why not my app).
My problem so far is that I don't understand how I can use an API like NodeJs's fs from a Meteor client.
Edit: This question is for a client Meteor app, connected to a remote Meteor server.

Recent versions of Electrify enable an easy IPC connection between Electron's NodeJS and Meteor as RPC, allowing the Meteor client to remotely call the functions of Electron's NodeJS.

Related

How to run Node js in React Native App after generating the Apk?

I am currently using Express and Node js as my backend for my react native app. Right now i need to run my node js server if i want my react app to access the backend and my REST API. I wanted to know how can i run node js in my react app after i extract the apk file. How will others be able to use my app on their networks. How to run the node js server remotely.
Sounds like you misunderstand a few concepts:
You don't run the api server from the client. The server must already be running if you want to access it from the client
If you want others to use this api with their clients, you should be running your api server in a public env (instead, or along with your dev env) so it will be accessible to clients from around the world

client not connecting to node js server on AWS with WSS/WS protocols

I created a small server using socket.io and node js and deployed in heroku earlier. I was easily able to have client connected to server with wss/ws protocol but when I deployed my app too AWS, Clients are not connecting. I debugged the application in client side but Its just not connecting to server. Did I miss something? are there extra steps needs to followed to make it work?
Thanks.
Answering my own question, I had to add .ebextensions folder with a config in my project root directory. You can look at the following tutorial to make it work https://nikhilmopidevi.github.io/2017/10/18/WebSockets-with-AWS-Elastic-Beanstalk/

How can I get an Electron and Socket.io app to run in a thin client architecture?

I created an Electron for a tiny company that connects to a Socket.io server. This app obtains the username of the logged in user and the MAC address and sends this info to the server for processing. All of this is working fine with regular desktops. Now, another company wants the same app, but they have a thin client architecture. Is there a way to get the app to run in this kind of architecture?
I am having a hart time figuring it out. I have never dealt with thin clients.
1) In the thin client architecture, would I have my socket.io server code and the app in the same server then? If they are in the same server, how could I get the app to connect to the socket.io server? They are in the same machine, so I am confused.
2) One problem is the app can't obtain the MAC of the thin client because once executed from the thin client it will end up getting the MAC of the server. Is there a way to obtain the MAC of the thin client using Node.js? Is there another way of using Node to recognize some sort of id for the thin client?
I would like the thin client to log in to the server, execute my app automatically, connect to the socket.io server, and send to it the username of the logged in user and the MAC address of the thin client. Is this possible? Do you have any suggestions on how to accomplish this?
You have to use the serverside code of the library for your server. E.g. node express.
Then you have to use the client side code of the library in a client side application. E.g. electron
Electron is a combination of node and chromium and you have to install the final build on the clients machine(s).
Of course, you can do all the things you ask about. Just read the socket.io docs. Its very easy, you can do it by specifying the host IP and listening/emitting events.

Server Changes on an Ionic Project

I am simply a beginner at NodeJs. I have a client's Ionic project.
He has sent me
Server Access FTP:
IP, user and pass
and has said, if any server side changes then to be done on server.
app.js file for socket and server side component is in /usr/www
Now i can't find any 'app.js' consisting of node commands in the project. There is an app.js in www/ directory but there is not node command inside. How to access server and where to use the IP, user, pass.
Please explain if you know the answer. Considering me totally nil at node.js and express.js
You can use node-ftp as a FTP client. It is a module for node.js which will provide an interface to communicate with the FTP server. You can refer this link to get more information about node-ftp.

Creating a client which can interact with asterisk manager using node.js

I have a node.js server, what I want is that the same server should run as a client for asterisk manager and can connect to AM using node.js.
The overall architecture will be like this :
Client interact with node.js server.
The same server acts as a client to asterisk manager.
Asterisk manager will provide data to client(which is also a node.js server)
Now the node.js server will push data to its actual client.
It's too difficult to get a nodejs compatible client, probably you will have to build a complete module which is compatible with nodejs.
My requirement was also the same, I would suggest instead of looking for any nodejs module use sipml5 client with asterisk. The audio part can be handled with sipml5 and other features can be built with nodejs.
Thanks
I'm writing similar app by nodejs.
Use asterisk-ami npm module so you can connect to your asterisk server and access required events.
Here's the link for the described module:
here's the link for the described module.

Resources