Using Require.js with Trigger.io - requirejs

I just started using Trigger.io and am building a movie mobile app using backbone.js and require.js but without much success.
My project scaffold is generated by Grunt-BBB.
It runs fine when it's built and run as a web app ("forge build web", & then "forge run web"), but unfortunately, it fails to load the JS files when it's built and run as iOS or Android. I've looked through the demo Backbone.js example, but it's not using Require.js.
I realize that Require.js is async in nature and that might be the root cause of it not working when running on the mobile.
Any alternative to Require.js or work-around to get Require.js working with Trigger.io will be appreciated! Thanks!

I just had a go with Require.js in a Trigger.io app and it seems to be working fine on both iOS and Android. I don't have an app setup with Grunt-BBB so I haven't tested that.
When running on Android you should see any Javascript errors that occur in the log output, do you see any, and if so are they at all helpful?
Otherwise if you could zip up the src folder of the app you are trying to build and send it to support#trigger.io we can take a more detailed look at what is going wrong.

Related

Debugging not working in Intellij - NodeJS + NestJS App

I am trying to debug a nodejs + nest application in IntelliJ, I am able to start the application using two types of configs.
Using Yarn (through NPM configuration template in intellij)
Using Node (I am not sure but when I use the main.js from dist folder then I get some debug point but it is useless as it is not pointing to my actual code base)
Debugger doesn't work for any of the above options!
I am posting screen shots of both the configurations.
New to Node + IntelliJ, so not sure what did I do wrong in both the configurations! Any help would be appreciated.
Intellij Version is 2020.3.3 And NodeJS application exposes several APIs, I am trying to call the APIs using a Postman and expect it to debug.
Debugging in both main.ts and controllers works for me when using the configuration below:
See also https://github.com/nestjs/nest/issues/993 for some recipes

Reactjs + Electron + Nodejs

I've been researching for long time but haven't found what I need. Maybe here someone can help me out.
What I want:
I'm trying to create an application that will run inside electron. Both frontend and backend should be encapsulated within a single executable, so I was thinking React js and Nodejs would be a good option.
But it's not as simple as I thought. Found a good boilerplace for reactjs https://github.com/electron-react-boilerplate/electron-react-boilerplate but I have no idea how I could encapsulate nodejs as a backend to it.
It'd also somehow would need to be integrated with the release package and so on...
Additionally I'd need to have a webserver that will run on localhost:[port] when you launch the application.
Technical Summary:
So basically:
Electron with React js - as the application 'face'
Nodejs - as the backend of the application
Webserver running locally - (using react js).
In the application, I would put link to the pages that is served by that locally running reactjs web app.
Hope I was clear. And I really hope someone can help me out.
Thanks!!!
as you know the serverside part is separate from front end.you can lunch react electron together like this article https://flaviocopes.com/react-electron/ .but serverside must start to stand alone . you could use pm2 for launching them.http://pm2.keymetrics.io/
lets talk about electron. what is electron?
according to electronjs.org :
Electron is an open source library developed by GitHub for building
cross-platform desktop applications with HTML, CSS, and JavaScript.
Electron accomplishes this by combining Chromium and Node.js into a
single runtime and apps can be packaged for Mac, Windows, and Linux.
so the electron is a tool for creating desktop applications.it uses chromium engine for accessing resources of the operating system level. but the intention of that is creating apps not a serverside job.
if you have some needs and logics that must handle in a server you should be considering that. otherwise, read about serverless applications.

Vue Micro UI/Web Components Development Workflow

Seeking some ideas on how to better improve my teams local development workflow...
We have a Vue CLI shell application project that runs locally via node. Then we have a number of small Vue CLI web-component applications that served up via node.
When the shell is ran it reaches out to each web-component application retrieving a manifest.json file which tells the shell where/when to display the respective web-components.
Our web-component applications are built using something like...
vue-cli-service build --target wc --name foo 'src/components/*.vue'
Having to continuously build the web-component projects after making a code change... debug... and then rebuild again seems cumbersome. This is a new application so at the moment the codebase is in constant flux.
Was hoping someone may have suggestions on how or tools we might use to increase our productivity.
Don't overcomplicate things.
Here's Nuxt.js
As far as I can tell it does everything you want to do straight out of the box. Just set up a basic hello world project with Nuxt and see if it does everything you need it to do for you. It uses Vue.js and Webpack to build the exact same type of application you'd be developing otherwise with Vue, it just has a nicer layout and easier workflow in general. It supports hot reloading on file changes, you'd just run nuxt in the root folder of your project and a local server is started that hot reloads your project whenever you save changes to a file. You then distribute it either as a static application with nuxt generate or build it as a server side rendered application using nuxt build and nuxt start.

Node Js with Azure WebApp using VSCODE

Recently i have deployed a node.js server side app with budo and it works fine.. but after deploying to Azure(WebAPP) it is not working and throws error that 'require' is not defined. I have used VSCode to develop the project
After some research, I found that the bodu which is a browserify development server. So it looks like your app is in client-side JavaScript but the node.js app is in server-site, they are technically different. And require() does not exist in the browser/client-side JavaScript, so it raised your issue.
To fix this issue please try using a modular script loader like browserify to traverse all your sources and concatenate all required files into the bundle then including bundle.js in your HTML file. Finally, redeploy it and you will get it worked.
Any further concern or if I have any misunderstanding, please feel free to let me know.

AngularJS app packaging for autonomous application

I wrote an angularJS app (with nodeJS and ExpressJS as my server). My app is totally independent from the server (I used pouchDB for the data). I would like to create an app/package that can be run from a computer or tablet. How can I do that?
I'm sure there are already lot of questions/answers about this topic but I couldn't find the right solution so I apologize in advance!
Thanks
If you r looking for an full-stack framework, i can really recommend Ionic.
It is a framework, that contains it's own customizable ui-framework(build on sass bootstrap), it is build on cordova aka phonegap and makes it easy to deploy and test the code on android, ios, ... . It is also optimized for angularjs and offers for most functions a directive.
I really love it. I did write a blogpost in german: kkonstantin/ionic
Maybe take your existing frontend javascript code and make use of a css framework, to make it look great for all window sizes.
Like: Ratchet (build on bootstrap)
Then you just make use of Phonegap to deploy your html/css/javascript code to the plattforms.

Resources