Running client and server modules in Noflo - noflo

I have a noflo Node.js runtime set up with a hosted Noflo-UI. Is there any way to run client-side modules in the same graph as the Node.js runtime? I need to upload an image file, send it to the server, then send it back and display it in the preview window. Thank you very much for any input!

You cannot run them in the same graph, but you can use a noflo-nodejs runtime as a component in the noflo-browser one. You need to add noflo-runtime as a dependency in your component.json (for browser) and declare the runtime. Example

Related

Reuse Vue2(Nuxt2) components in Electron new browser Window

I am making an app in Electron with Nuxt 2 and I want to open another window in witch I want to use components from ./components folder. Along those components I would want to use the Vuetify instance that I have in the main window so the design will be the same.
Communication between windows will be don with ipcMain and ipcRenderer.
How should I make the html file that I load when the secondary window is created ? What should be in there ?
I do not want to load the entire app and use only a route. The app is pretty bight and it would be just a waste of resources.
Also I use electron builder for production builds and a http server for dev builds.
Thank you.

Trigger more than one URL after IntelliJ Run configuration is run

I have a Run configuration which builds an exploded web app, deploys it to tomcat, and opens the home page after that. However, I want to hit a few URLs to set some state in the app before opening the home page (Or after opening the homepage; it does not matter). Is there a way to trigger a few URL hits after the run configuration? This feature would be similar to "before launch." Instead, it would be "after launch".
There is no such feature at the moment, you can vote for the related feature request.
It's not as simple as it looks since it's not clear what would trigger the after event. The app server doesn't exit/terminate, but is still running, therefore it's not possible to use another run configuration with your app server added in its Before launch steps, otherwise you could create a Shell script configuration that would call curl/wget.
For the app server the proper after event would be the moment when the artifact deployment is complete which requires the tight integration with this specific app server so that IDE knows the exact moment when it happens and allows to call some custom action.
This might be possible with the custom plug-in as IDE already knows when the artifact deployment is complete.
A really hacky workaround would be to run some tiny HTTP server and open its URL from the IDE instead of your real app server. This custom server would call the URLs/APIs you need and then open a browser for your real app URL.

How to recognize programmatically that application is installed vs development mode?

I'm trying to get information about license info of my app and MSDN docs (http://msdn.microsoft.com/en-us/library/windows/apps/hh694065.aspx) advice to use Windows.ApplicationModel.Store.CurrentAppSimulator class for that purposes during development/testing and when submitting app to store replace that class with Windows.ApplicationModel.Store.CurrentApp.
I wonder if there is any way to check in code (javascript in my case) if app is already installed from store so my code should use proper class and I won't have to remember every time I submit update of app to store to replacing those classes properly.
As far as I know, I could not find such thing. In fact, LicenseInfo is what provides information about the store listing.
I use a config.js file to keep settings at place which change between development and production. For example - if your app talks to a service, service URL also will likely change between development and production; the service might be running at localhost for development and for production in azure environment. I keep a bool in here and change by hand.
I have not automated it fully. but it is likely possible. need to dig through the msbuild logs for the build created for the store. if there is configuration setting found, then project can have two config.dev.js and config.release.js and msbuild need to conditionally pick the right file. I haven't looked into this yet.
I think I found at solution as described here WinJS are there #DEBUG or #RELEASE directives? . Not ideal, but works for me.

how to load injection lib in mac applications at application start?

I have a dynamic library, I intent to inject in running application & newly launched applications.
I can inject it in running applications with the help of a process running with root user permissions.
Now I am trying that library should get loaded as soon as application is launched. I know one such library capable of doing this called, application enhancer. I am looking for similar behavior.
Does anyone has an Idea how can this be achieved?
Look at SIMBL agent code. It adds a observer to application launch notification and then injects. You can follow the same approach.

Titanium Mobile: execute code loaded from network

I'm writing mobile apps with the help of Appcelerator's Titanium Mobile.
I need to load javascript code (business logic) from our server and execute it on the device. So this is basically dynamically injecting code into Titanium Mobile app. Additional note: this code needs to call a few Titanium's methods.
Can this be done?
Thanks, Peter
Yes this can be done. You can't put this application in the App store as it's against their Terms of Service to download code remotely and execute it.
There are examples in the Kitchen Sink on downloading a file remotely and saving it. That file can be a .js file, and can be included or referenced when your app loads. It can have JSON, functions, whatever in it.
I'm doing this in an app right now for moving JSON objects around, but should be able to run code too.
http://developer.appcelerator.com/question/105001/httpstackoverflowcomquestions4802859titanium-mobile-execute-code-loaded-from-network#185361