wiki:Notes/NodeJS

node.js

This page is way too big, but then the subject of NodeJS is huge as well.

NodeJS has extensive support, is as web-aware as technical enviroments get, has a good solid good API and will possibly become one of the standard command languages. What's there not to like ?

Well ... possibly applications that conflict with the asychronous event / reactor model. It's like Twisted, only more so. In fact, sometimes you have to struggle to shoe-horn straight-forward procedural code into NodeJS.

Fortunately, there are tons of extention libraries that help developers build conventional applications. However, if that's what you are doing with it, straight procedural programming, you probably shouldn't be doing it with NodeJS, at least not directly.

For building simple quick "web memo" applications using MongoDB or CouchDB, there's nothing quicker and easier that I've discovered. http://nodejs.org/

http://nodejs.org/api/

http://en.wikipedia.org/wiki/Node.js

http://rawkes.com/articles/running-node.html

Firefox and NodeJS

Firefox Addon https://addons.mozilla.org/en-US/firefox/addon/nodejs/
Node Firefox - No Windows ? https://github.com/mozilla/node-firefox
Recent Article about node-firefox http://sdtimes.com/mozillas-node-js-modules-firefox-os-git-2-3-new-hybrid-azure-test-environments-sd-times-news-digest-feb-6-2015/
Node.js Articles at Mozilla https://hacks.mozilla.org/category/node-js/

Essential Node JS Apps

Every language environemnt needs to have killer applications... that is, apps that make you need to have Node JS. I have found several of them so far and am likely to find more.

Etherpad Lite

Etherpad is a killer app, no question about it. A collaborative editing applications, it works great, opens new visas, is almost unique ... however, there is one fly in the functional soup, cutting and pasting large blocks of text.

I pasted a 43K block of text into an etherpad page using Notes/Firefox and the machine went bye bye for a full minute or more. !!!!

In contrast, I did the same thing with PyWacket Chat ( Tornado with web sockets ) and the result was messy but machine didn't seize up ... so ... maybe bad news for etherpad as a general purpose cut and paste solution.

Pasting 1K of text seems to be OK. Gobby has the same problem, maybe on a lesser scale - see GTKApps#Gobby

http://etherpad.org/

https://github.com/ether/etherpad-lite

Etherpad Lite Demo - https://beta.etherpad.org/

http://en.wikipedia.org/wiki/Etherpad#Etherpad_Lite

From https://github.com/ether/etherpad-lite/wiki/How-to-deploy-Etherpad-Lite-as-a-service :

https://help.ubuntu.com/community/Etherpad-liteInstallation

Node XMPP

Don't know if this things will work. Be great if it did.

https://github.com/node-xmpp

https://github.com/node-xmpp/node-xmpp - supposedly with a built-in XMPP server

Dependencies

node-expat (requires libexpat!) ltx

https://github.com/node-xmpp/node-expat - Oh oh ... depends on Win32 binary expatlib, no new release since 03-2012, update: checked link, new release June 2016, Expat 2.2.0 ... all is well.

This type of dependency to an under-supported Windows binary can be a problem, but does it matter in ever case ? The XML standard is mostly static, so it probably did not matter in this case ...

https://www.simonholywell.com/post/2013/02/create-a-node-js-google-talk-bot-pt1.html

https://www.simonholywell.com/post/2013/03/create-a-node-js-google-talk-bot-pt2.html

Probably Essential NodeJS Apps

Socket.io

http://socket.io/

https://github.com/Automattic/socket.io

Old link: http://socket.io/download/

They strongly recommend using npm to install socket.io and its dependencies. Use https://github.com/socketio/socket.io for source file download.

http://en.wikipedia.org/wiki/Socket.IO

Socket.IO is a JavaScript library for realtime web applications. It enables realtime, bi-directional communication between web clients and server. It has two parts: a client-side library that runs in the browser, and a server-side library for node.js. Both components have a nearly identical API. Like node.js, it is event-driven.

Socket.IO primarily uses the WebSocket protocol with polling as a fallback option,[2] while providing the same interface. Although it can be used as simply a wrapper for WebSocket, it provides many more features, including broadcasting to multiple sockets, storing data associated with each client, and asynchronous I/O.

Live Demo of Chat http://socket.io/demos/chat/

Seems to have a fairly impressive chat application, didn't choke on several K of pasted text ....

https://github.com/Automattic/socket.io/tree/master/examples/chat

Also see http://express-io.org/

  • "express.io = express + socket.io"

Also Python implementation of ???? See WebSocket#GeventandSocketIO

Mongo DB

See Main MongDB page.

About the Mongo Shell - JavaScript http://docs.mongodb.org/manual/reference/program/mongo/#bin.mongo
Mongo Native Driver https://github.com/mongodb/node-mongodb-native
Docs http://docs.mongodb.org/ecosystem/drivers/node-js/

The MongoDB Node.js driver is the officially supported node.js driver for MongoDB ...

  • written in pure JavaScript
  • provides a native asynchronous Node.js interface to MongoDB.

... Can be used on its own, but it also serves as the basis of several object mapping libraries, such as Mongoose.

Mongoose RDB Mapper http://mongoosejs.com/

Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

Express JS

http://expressjs.com/

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.

Installation via npm: http://expressjs.com/starter/generator.html

  • NPM installation seems to assume Linux
Database Integration http://expressjs.com/guide/database-integration.html
API http://expressjs.com/api.html
Strompath Example of Simple Web App https://stormpath.com/blog/build-nodejs-express-stormpath-app/
AngularJS Tutorial With NodeJS ExpressJS and MongoDB (Part I) http://adrianmejia.com/blog/2014/09/28/angularjs-tutorial-for-beginners-with-nodejs-expressjs-and-mongodb/
Creating RESTful APIs With NodeJS and MongoDB (Part 2) http://adrianmejia.com/blog/2014/10/01/creating-a-restful-api-tutorial-with-nodejs-and-mongodb/
MEAN Stack Tutorial MongoDB ExpressJS AngularJS NodeJS (Part 3) http://adrianmejia.com/blog/2014/10/03/mean-stack-tutorial-mongodb-expressjs-angularjs-nodejs/

Express Database Integration - http://expressjs.com/guide/database-integration.html

Template Engines - http://expressjs.com/guide/using-template-engines.html

Possible Node JS Apps

See 5 Node JS Alternatives to WordPress

Keystone JS

A NodeJS version of WordPess . Have 'perused', run the demo, good bones, looks interesting.

http://keystonejs.com/

Node.js CMS & Web Application Platform

The open source framework for developing database-driven websites, applications and APIs in Node.js. Built on Express and MongoDB.

https://github.com/keystonejs/

A node.js CMS and Web Application Framework

Chat

Node JS Chat https://github.com/amirrajan/nodejs-chat
Node JS To Do https://github.com/amirrajan/nodejs-todo
Springle Chat - Realtime chat using NodeJS and WebSocket https://github.com/riverspirit/Springle-Chat

FedWiki

https://www.npmjs.com/package/wiki

Since the earlier creation of the node version, to complement the original Ruby implementation, there has been a risk of the two versions diverging ...

Support for MongoDB is added by installing the wiki-storage-mongodb package ...

https://github.com/fedwiki

https://github.com/fedwiki/wiki-node-server

Demo: http://fed.wiki.org/view/welcome-visitors

Blog: http://blog.jonudell.net/tag/fedwiki/

See SemanticWiki#FederatedWiki

Tiddly Wiki

http://tiddlywiki.com/

TiddlyWiki is designed to be non-linear, structuring content with stories, tags, hyperlinks, and other features. You can organise and retrieve your notes in ways that conform to your personal thought patterns, rather than feel chained to one preset organisational structure.

You can use TiddlyWiki as a single file that you view and edit through any web browser, whether you are online or offline. Or you can use it as a powerful Node.js application that stores each of your notes as a separate file ...

Running TiddlyWiki on Node.js brings several important benefits over and above the single file version:

You can edit your content on any suitably compatible HTML5 browser, including smartphones and tablets

Individual tiddlers are stored in separate files, which you can organise as you wish

The ability to build multiple wikis that blend different combinations of shared and unique content

Tiddly Fox

https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/

TiddlyFox is an extension for Firefox that allows standalone TiddlyWiki files to save their changes directly to the file system.

TiddlyFox works on both desktop and smartphone versions of Firefox. See Saving with TiddlyFox or Saving with TiddlyFox on Android for detailed instructions.

Other Apps

Not sure about these, need to look at ... need to find time to look at ...

Pouch DB

http://pouchdb.com/

PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser.

PouchDB was created to help web developers build applications that work as well offline as they do online.

It enables applications to store data locally while offline, then synchronize it with CouchDB and compatible servers when the application is back online, keeping the user's data in sync no matter where they next login.

See Erlang#CouchDB

zmqbus

https://www.npmjs.com/package/zmqbus

zmqbus - A broker-less message bus with failover

Peer to peer messaging bus, zero setup with failover and pub/sub functionality.

Superfeedr

https://github.com/superfeedr

https://github.com/superfeedr/xmpp-server/ - A full XMPP server using node-xmpp, with some modules.

Dependencies: "node-xmpp": ">=0.3.2", "redis": ">=0.7.1", "websocket": ">=1.0.4", "ltx": ">=0.1.3", "jsconfig": ">=0.2.0", "winston": ">=0.5.10"

AMQP Node

https://github.com/squaremo/amqp.node

A library for making AMQP 0-9-1 clients for Node.JS, and an AMQP 0-9-1 client for Node.JS v0.8, v0.9, v0.10, and v0.11. expects RabbitMQ

https://github.com/squaremo/amqp.node/tree/master/examples/tutorials

Contains the RabbitMQ tutorials, ported to amqplib. The sub-directory callback_api has translations of the tutorial programs to the callback-oriented API.

https://github.com/mapbox/node-sqlite3 - special instructions for building on windows, deal breaker ?

https://github.com/kripken/sql.js - sqlite3 with no binaries

Node JS XMLRPC

https://github.com/baalexander/node-xmlrpc

The xmlrpc module is a pure JavaScript XML-RPC server and client for node.js.

Pure JavaScript means that the XML parsing and XML building use pure JavaScript libraries, so no extra C dependencies or build requirements. The xmlrpc module can be used as an XML-RPC server, receiving method calls and responding with method responses, or as an XML-RPC client, making method calls and receiving method responses, or as both.

http://qzaidi.github.io/2011/10/16/magento-node/

... a javascript client for magento’s API

http://magento.com/ - Magento’s commercial ecommmerce solution

http://theblog.systemwebservice.ch/2011/12/03/node-js-xml-rpc-server/

Das Pendant zum XML-RPC Client, der XML-RPC Server.

Good style in any case ...

https://www.versioneye.com/nodejs/xmlrpc/references

These 58 software packages all depend on xmlrpc ( same as node-xmlrpc above )

... including amazingly ...

https://github.com/lukaszb/pypi

pypi is a simple client which can talk with Python Package Index.

Fire up coffee console and run:

coffee> pypi = require 'pypi'
coffee> client = new pypi.Client
coffee> client.getPackageReleases "Django", (versions) -> console.log versions

What the ... ???

See also https://nodejsmodules.org/tags/xmlrpc - FireFox? give warning about expired certificate

Codebox

https://github.com/CodeboxIDE/codebox

Codebox is a complete and modular Cloud IDE. It can run on any unix-like machine (Linux, Mac OS X).

It is an open source component of codebox.io (Cloud IDE as a Service) ...

Codebox is built with web technologies: node.js, javascript, html and less. The IDE possesses a very modular and extensible architecture, that allows you to build your own features with through add-ons. Codebox is the first open and modular IDE capable of running both on the Desktop and in the cloud (with offline support).

https://www.codebox.io/about

Node Webkit

https://github.com/nwjs/nw.js

Call all Node.js modules directly from DOM and enable a new way of writing applications with all Web technologies ...

Apps written in modern HTML5, CSS3, JS and WebGL.
Complete support for Node.js APIs and all its third party modules.
Good performance: Node and WebKit run in the same thread: Function calls are made straightforward; objects are in the same heap and can just reference each other;
Easy to package and distribute apps.
Available on Linux, Mac OS X and Windows

http://nwjs.io/

... It was previously known as "node-webkit" project ...

https://github.com/zcbenz/nw-sample-apps

Sample apps for node-webkit

https://github.com/mllrsohn/node-webkit-builder

Lets you build your node-webkit apps for mac, win and linux via cli. It will download the prebuilt binaries for a newest version, unpacks it, creates a release folder, create the app.nw file for a specified directory and copies the app.nw file where it belongs.

App JS

http://appjs.com/

https://github.com/appjs/appjs

AppJS project has not been actively developed for several months [ years actually ].

https://github.com/sihorton/appjs-deskshell/

... Linux coming soon ...

Database Adaptors

Java Data

http://jaydata.org/

https://github.com/jaydata/jaydata

JayData? is a unified data access library for JavaScript to CRUD data from different sources like WebSQL/SQLite, IndexedDB, MongoDb?, ASP.NET WebAPI, OData, HTML5 localStorage, Facebook or YQL.

The library can be integrated with KendoUI, Knockout.js, Handlebars.js or Sencha Touch 2 and can be used on Node.js as well.

Interesting idea but vague on what it actually does.

Warehouse.js

https://www.npmjs.com/package/warehousejs

https://github.com/dundalek/warehouse

Warehouse.js is a data storage layer for node.js and browser providing unified API for many supported storage engines (MongoDB, MySQL, SQLite, in-memory and others). You can create REST server or client with only few lines of code.

Supports multiple backends (MongoDB, MySQL, SQLite, in-memory and others)
Create REST server using few lines of code (compatible with Backbone.js)
Unified API for CRUD operations
Powerful query language RQL
MIT License

Again, interesting idea but do I really need the performance hit of a SQL generator.

CaminteJS

http://www.camintejs.com/

https://github.com/biggora/caminte

CaminteJS is cross-db ORM for nodejs, providing common interface to access most popular database formats.

CaminteJS adapters: mysql, sqlite3, riak, postgres, couchdb, mongodb, redis, neo4j, firebird, rethinkdb, tingodb

Fairly straightforward. Last activity 5 months ago.

http://www.trintejs.com/

A MVC boilerplate for ExpressJS backed by CaminteJS and Bootstrap, based on Express MVC Bootstrap ...

Node.js: Amazing javascript asynchronous IO library, install manually.

NPM: Node package manager, used to install:

Express.Js: Application Framework for Node.js

Caminte.Js: Node.JS ORM for MongoDB, Postgres, MySQL, Redis, Nano etc.

EJS: Embedded Javascript Templating Library.

jQuery: Best Javascript Library

Bootstrap: Powerful front-end CSS/JS framework

Glyphicons: Fantastic library of precisely prepared monochromatic icons and symbols.

Juggling DB

http://jugglingdb.co/

https://github.com/1602/jugglingdb

NodeJS on Ubuntu and Mint Linux

Note: on Linux Mint and Ubuntu(?), the Node JS command 'node' conflicts with system commands. Consequently, Node JS is called by 'nodejs' rather than 'node'. This fouls up the Etherpad installation.

Go to scripts in the bin directory and change 'run.sh' and 'installDeps.sh' to refelct call to 'nodejs' rather than 'node'. There are three of them, if memory servers.

Also See

wiki:/Notes/JavaScript

wiki:/Notes/Firefox

Search wiki for 'nodejs'

Last modified 2 weeks ago Last modified on 11/24/2017 12:05:05 PM