I am trying to use Strophe.js (https://github.com/strophe/strophejs) to create a browser-based XMPP client. However, the documentation doesn't explain how to get it set up and running and the examples provided in the GitHub do not run in a browser.
How do I install strophe.js for use with a browser, or what steps should I take to use it in a javascript application that is not using node.js?
You are checking for documentation in github project repo which may or may not necessarily contain the documentation. The correct link for the documentation can be found in the project homepage (link is provided in the repo) as well as the link to the latest documentation (which is also provided in the project repo). Few examples are also included as part of the project repo ( https://github.com/strophe/strophejs/tree/master/examples)
Related
I'm getting started with JS so I've reached the point where I have to install a live server with npm. VSCode has a popular extension that many know of called Live Server(Ritwick Dey), my question is what is the difference between using the extension and installing the package with node? Are there any standout features that could aid in my development or are they pretty much the same? Thanks
Both will work in a similar way if you do not plan to use custom configurations and work alone on a single computer.
If you are working in a large team and want to have the same setup available for everyone, you should install the node module for the project and go with the 'Usage from node' section of the documentation.
Both options have great documentation on how to customize them. They differ in naming but for the most part both projects offer similar options.
For live-server, the npm package, your can use the online documentation to see the available ones.
https://www.npmjs.com/package/live-server
For the VsCode extension, you have a list of available configuration here.
https://github.com/ritwickdey/vscode-live-server/blob/HEAD/docs/settings.md
Before selecting one for you project, you should look at the available options and see if there is a feature that might be helpful for your project.
For some time I am using autobahn.js and autobahn.min.js files in my project linked directly from:
https://autobahn.s3.amazonaws.com/autobahnjs/latest/autobahn.js and
https://autobahn.s3.amazonaws.com/autobahnjs/latest/autobahn.min.js
as suggested on http://autobahn.ws/ website.
Today I found out the two above files are no longer accessible via these links. Only thing I can see is 403 error with message: Access Denied.
I can not find any mirrors anywhere. I tried to build them using this instruction: http://autobahn.ws/js/building.html. No such luck. Where can I find autobahn.js files so I can download them in case of situation like this happen in the future?
Self answer. Unfortunately author decided to remove all the files from Amazon S3 as described: https://groups.google.com/forum/#!topic/autobahnws/aHxWgImJvCY
Hi,
we (Crossbar.io GmbH) have not only provided massive development
funding of AutobahnJS, but also free hosting of AutobahnJS for
development purposes (download it and host it yourself).
We asked people NOT to hot link to this bucket MULTIPLE times, as we
have to pay for the traffic obviously.
Now, it seems, people don't get that.
Our traffic costs have persistently increased to a surprising level. I
just wanted to delete the log folder alone in that bucket - and I have
a hard time, the log files number in the 100k's!
There seem to be a number of highly frequented sites hot linking to
our bucket.
Now, instead of injecting some nice JavaScript to completely take over
all those sites (which is trivial and would take me half an hour to do!), we have decided to remove the whole bucket.
Dozens of sites will break. Not our problem.
Cheers, /Tobias
Newer source files can be still found on github (the one that implements wamp v2). Last version that implements wamp v1 (v.0.8.2 of autobahn-js) however can be found in this repo:
https://github.com/sergeyvolkov/autobahn-old
It can be hot swapped if you were using links from my question. Good source of other older versions is to digg through releases on GitHub page:
https://github.com/crossbario/autobahn-js/releases
Try this link https://github.com/crossbario/autobahn-js-built . They have the files
There's a README:
https://github.com/crossbario/autobahn-js-built/blob/master/README.md
Here's a summary:
Install bower:
npm install -g bower
Install autobahn in your web dir:
bower install autobahn
Change your links to point to:
<script src="/bower_components/autobahnjs/autobahn.min.js"></script>
I'm not sure why you replied to another comment RE wamp v1 / v2 as the URLs you posted are retrieving the latest.
Before filing an issue on it's github, can't ua-parser-js be used on the client in Meteor? I have added 0.7.9 successfully to my 1.1.0.3 app with meteor add faisalman:ua-parser-js. It seems to be exported as UAParser in package.js here, for both client and server. Still, I can't seem to acccess it? See this MeteorPad for examples of what I've tried.
UPDATE: Issue filed on GitHub. Also note that I recommend feature detection. ;)
I'm a PHP programmer and currently working with WP, CI, OC.
I am absolute beginner of node.js, want to know how to connect MySql and WAMP/XAMPP in step by step method.
If I am going to live it, then what will be the live server setup.
Please let me know in step by step method.
Follow this tutorial.
Tutorial Here
To use node.js you need to install the packet manager NPM and use it to install the dependencies of your project.
In the example tutorial I posted above hes uses NPM to install all his dependencies to connect to mysql just as you requested. He also provides sample code.
Good luck!
Here is another few tutorials you might follow,
Click Here
This uses mongoDB instead of mysql but following this tut will help you get things running quicker then you can find something to help with mySQL.
Click Here
After installing npm with the tutorial right above here and you check and make sure you have npm installed then follow this youtube tutorial to get mysql set up with node.
And here is a youtube video.
Click Here
It might help to use this package Node Mysql Package. Also you can find the resources in the answer to this question here.
I am trying to learn Electron (Atom-Shell) but I am finding it pretty tough to find documentation for it...
I am simply trying to figure out how to create a link with in index.html, and have it open a terminal window or run some sort of program.
I learn languages by learning specific tasks as I need them in a program, so that is why I am asking so then I can utilize the technique used in other ways in my programs.
Thank you for helping.
Well, essentially Electron is just a customised version of a Chromium browser that comes packaged with Nodejs and some really cool packages that basically allow you to run the custom browser as if it was a native platform application. Because of that creating an Electron app is very similar to creating a web-app that has a Nodejs back-end.
So to get started with a simple "Hello World!" app, you can just run the following npm...
npm install electron-prebuilt --save-dev
Once the npm is installed you'll need three files to run an Electron app.
A package.json file
A javascript file (default is main.js)
An html file (default is index.html)
See this GitHub repo for a quick copy/paste version of each and more detailed instructions: https://github.com/mafintosh/electron-prebuilt
after that you're ready to simply run your app...
$ electron .
Finally, one way to open a terminal window would be to use an onclick attribute in your html to trigger a child_process, found here, in a function.
That's it! You should be able to edit your html and javascript files as you would for any web-app, and take advantage of the added features that Electron provides.
I'd also check out these resources for more info:
A Quick Start intro to how Electron works -- https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md
The Atom discussion forum (Because Atom was built with Electron, and is made to be hackable, the community is quite active) -- https://discuss.atom.io/c/electron
A cool repo to keep up with the latest info. It includes links for apps that currently use Electron, tutorials, videos, and more --
https://github.com/sindresorhus/awesome-electron
I hope that helps!