279ce5b929 | ||
---|---|---|
example | ||
lib | ||
node_modules | ||
test | ||
.gitignore | ||
README.md | ||
index.js | ||
package.json |
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'}
]