I have been searching for generating QR Code on Meteor Server.
But so far I have found the libraries which works only on Meteor Client.
So is there any library for Meteor which can generate QR Code on Meteor Server side?
I am a novice at Meteor and I have NOT TRIED this solution, but it seems plausible.
At the core of Meteor is NodeJS which has many more solutions available than you'll find for Meteor in Atmospheres, including QR code image generation. #Arunoda seems to have "hacked" together a way to run most anything under NPM...
https://atmospherejs.com/meteorhacks/npm
Once you have that working, you can probably use this handy NodeJS QR Code library...
https://www.npmjs.com/package/qrcode-npm
Related
As nodejs uses npm and angularjs cli also uses npm for modules.
Is there any relation exists between these two?
Installed node.js and tried with hello.js simply single line console.log.
Installed ng module and generated a simple angular app and started server using ng serve -o, kindly help me to clear doubt, if any relation exists between two.
nodeJs is for developing backend, Angular is for developing frontend
You can have a static web site written with Angular and hosting it somewhere like godaddy and that is it
If you need to show some data, interaction with database, submitting data,... then you need a backend, one of the platforms for backend is nodejs, also you can use asp.net webapi, or java or ...
Node and Angular are two distinct entity. In the "web world" there is two distinct things :
Code running on the client side (running in your navigator), frontend, generally using Javascript/HTML/CSS . This code here is used to design your webpage and interact with the user. There is where angular/angularjs work
Code running on server side, backend, this is where people use NodeJS. Here you find more logical code used to manage and to store the data thank to database. Here you can use node express or nestjs to create an http server using node.
Link between both ? Both can communicate using http protocole (we use the angular http client to do that). We simple ask the node server the add/update/remove/calculate data and we play with it :)
Angular.js is a client-side framework that runs in web browsers.
Node.js provides an environment for running JavaScript from a command line.
Angular.js is supported by a bunch of development tools (such as test HTTP servers, and transpilers to convert from TypeScript to ES5). Many of these tools run via Node.js.
You can also use Node.js for server-side programming to support the client-side code in a live environment.
I am a noob to meteor and have tried very hard to follow some tutorials on getting mongodb access to work. I have installed meteor 1.7.0.5 on a mac and have tried to run the https://www.meteor.com/tutorials/react/creating-an-app tutorial up to step 3. I can see my data in the meteor mongo console, but it does not appear in my web app even though I have followed the instructions up to step 3. weirdly I have managed to get exactly this same code working on a raspberry pi.
I was looking at meteor as a possible alternative to firestore, but the problems are starting to put me off of wanting to use meteor js in future projects.
I'm able to run any ReactApp only on Nodejs server, but not on a Tomcat server.
Some Qs:
React is purely client side rendered library, and why it requires Nodejs (which is server based)? Why React official Tut recommends Nodejs?
Is it true that Tomcat is for running pure Java applications, and Nodejs for pure JavaScript applications?
I tried to run a sample ReactApplication with few containers in Apache Tomcat, by including the Reactjs include files. But, I get a blank screen. Inspect element shows the non rendered JS source.
Update 1:
If yes for Q1, then Here's a simple React ready application (with all dependencies included) which is easy to run in Nodejs using NPM. How can I run the same app in Tomcat? Can I able to create Web ARchive using this?
1.React is purely client side rendered library, and why it requires Nodejs (which is server based)? Why React official Tut recommends Nodejs?
React is a client-side library but it requires NodeJs for below reasons :
- React uses JSX syntax which browsers doesn't understand and hence it needs to convert into a javascript code that browsers can understand, Babel will do that. Babel needs NodeJs and with the configuration you can convert JSX, ES6 code into ES 5 which browsers can understand
- You may also need node js server if you are using React on server side but this is optional
The sample that you have given needs to transpile into ES 5 code using web-pack which uses Babel. WebPack and Babel both need node js. Hence you need NodeJs.
I don't know what you hide under ReactApp.
But if you use React in client Side you don't need Nodejs server to run it. You can you Nodejs to build it, there is tools to simplify the work. So your ReactApp will be only an HTML page with some js dependencies. Apache or Tomcat can serve it, but for Tomcat you have to bundle it as WAR I think.
But you need rest endpoint to do some stuff, and you can do that with lot of technologies include java and tomcat.
YES
I'm building an app that uses only Polymer to structure the frontend. As a backend I'd really like to use Meteor with their Mongo realtime database.
I only need the part of Meteor that implements the DDP prototcol and provides the Mongo API to the client. Is it currently possible to remove the rest of the client libraries? I don't need jQuery, Blaze, Tracker and so forth.
I've already tried removing meteor-platform from the project, then adding all the packages meteor-platform consists of. This results into errors like ReferenceError: Meteor is not defined. It seems like this is not supported currently.
What I then used was Asteroid which is really nice. But using it prevents me from using Meteor packages like GroundDB for example.
Reading on the Meteor website gives me the feeling that it should be possible to use only some parts of Meteor, but this doesn't work for me.
What's the best way to tackle this problem?
Edit: I've uploaded a leaderboard example with the failing setup on GitHub. Meteor.isServer is causing the error. If you comment out the server stuff it works.
You're missing two packages:
meteor add meteor underscore
The meteor package is the one that exposes Meteor.isServer.
I am very new to Node.js (which I'm assuming this is; I'm so new that I'm not really understanding what's going on here). I'm working with a client library for a system called RJ Metrics. I'm basically tying their API in with a Volusion API in order to import data into their system from the Volusion site. The code for that all makes sense but I'm not understanding how to install it and use it.
Their documentation is here:
And I'm needing to use the Javascript library because I'm working with Volusion which is on a Windows server and there is no ASP/C# option here. It says The RJMetrics Javascript client library is available via npm: and then terminal code. After research, it appeared that this uses Node.js so I installed that on my computer and ran the npm install rjmetrics in the Terminal which succeeded. I was assuming though that I must have to log into their server and run the code in order to get it to work.
Does this require me to SSH into the server? Am I way off base and is there a way I can just include some JS files in my page? I looked at their GitHub too and all of the main files use the require() function in them which I'm gathering is a Node.js function?
Apologies if I'm way off, I'm into this up to my neck and just trying to sort it all out now.
This part of the documentation (to which you refferred) is just plain ol' javascript. though NPM is the node package manager. So if you want, it looks like you can just run this .js script in a web browser like any other.
var rjmetrics = require("rjmetrics");
client = rjmetrics.Client(api_key, client_id);
# do stuff with client
If you wanted to do it in Node, you would create a .js file on your machine with their API code inside of it doing whatever you want. Then in terminal you run the script by going "node myfile.js". A local webserver setup is all you need to create and test this.