# stackmob-nodejs

> Stackmob JS SDK for NodeJS

Latest version **0.2.1** (published 2012-05-04) · 0 weekly downloads

## Install

```sh
npm install stackmob-nodejs
pnpm add stackmob-nodejs
yarn add stackmob-nodejs
bun add stackmob-nodejs
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2012-05-04 |
| First published | 2012-03-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Surat Teerapittayanon |
| Maintainers | steerapi |

## Links

- npm: https://www.npmjs.com/package/stackmob-nodejs
- Repository: https://github.com/Wisdom/stackmob-nodejs
- npm.io page: https://npm.io/package/stackmob-nodejs

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) *
- [backbone](https://npm.io/package/backbone.md) *
- [localStorage](https://npm.io/package/localStorage.md) *
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md) *

## Recent versions

- 0.2.1 (latest) — 2012-05-04
- 0.1.0 — 2012-03-27

## README

#Stackmob JS SDK for NodeJS

See [http://www.stackmob.com/devcenter/docs/JS-SDK-Tutorial](http://www.stackmob.com/devcenter/docs/JS-SDK-Tutorial)

Change Logs (May 4, 2012):

*   Update to StackMob JS v. 0.2.1
*   Use lodash instead of underscore
*   Extension written in Coffeescript

Install:
    
    npm install stackmob-nodejs

##Examples    

Init:

    var StackMob;
    StackMob = require("stackmob-nodejs");
    StackMob.init({
      urlRoot: "http://api.mob1.stackmob.com/",
      consumerKey: "publicKey",
      consumerSecret: "privateKey",
      appName: "appName",
      version: 0,
      dev: true
    });

Read: 

    var username = "anonymous";
    if (username != '') {
      //Call StackMob via Ajax to read a user
      var fetchuser = new StackMob.User({ 'username': username });
      fetchuser.fetch({
        success: function(model) {
          console.log("We fetched the user from StackMob!");
          console.log(model.toJSON());
        },
        error: function(model, response) {
          console.log(response);
        }
      });
    }


Create:

    var user;
    user = new StackMob.User({
      username: "Chuck Norris",
      password: "myfists",
      weaponofchoice: "nunchucks"
    });
    user.create();

---
_Source: https://npm.io/package/stackmob-nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
