LoopBack makes it easy to build modern applications that require complex integrations.
Go to file
Ritchie Martori c9ae880822 Point deps at github 2013-05-02 11:31:44 -07:00
example Initial model refactor 2013-05-01 12:11:43 -07:00
lib Merge in models and data sources built from config to the app. 2013-05-01 12:34:31 -07:00
node_modules Fix wrong path for model 2013-05-01 14:36:14 -07:00
test init 2013-04-09 09:02:36 -07:00
.gitignore Point deps at github 2013-05-02 11:31:44 -07:00
README.md Model documentation 2013-04-26 11:44:19 -07:00
index.js init 2013-04-09 09:02:36 -07:00
package.json Point deps at github 2013-05-02 11:31:44 -07:00

README.md

asteroid

v0.0.1

Install

slnode install asteroid -g

API

app

Create an asteroid app.

var asteroid = require('asteroid')
  , app = asteroid();

app.dataSource()

Attach a remote data source to your app.

app.dataSource('color-db', {
  adapter: 'oracle',
  host: 'localhost',
  port: 2345,
  user: 'test',
  password: 'test'
});

app.define(name)

Define a Model.

var Color = app.define('color');

app.use(asteroid.rest);

Expose your models over a REST api.

// node
app.use(asteroid.rest);

// http
GET /colors

200 OK
[
  {name: 'red'},
  {name: 'blue'},
  {name: 'green'}
]

Asteroid Modules