Remove simple resource example
This commit is contained in:
parent
b9a239db32
commit
7b9d7b28a9
|
@ -1,7 +0,0 @@
|
|||
var asteroid = require('../../');
|
||||
var app = asteroid();
|
||||
|
||||
app.use(asteroid.configure());
|
||||
app.use(asteroid.resources());
|
||||
|
||||
app.listen(3000);
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"module": "resource",
|
||||
"options": {
|
||||
"path": "/example-resource",
|
||||
"msg": "my message?"
|
||||
},
|
||||
"main": "example.js"
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
// any module instance can be required by its directory
|
||||
var exampleResource = require('.');
|
||||
|
||||
// exampleResource.app is an express sub app
|
||||
// anything registered (routes, middleware)
|
||||
// will only run relative to the defined root
|
||||
// '/' resolves to '/example-resource'
|
||||
exampleResource.app.get('/', function (req, res) {
|
||||
res.send(exampleResource.options.msg + '??????');
|
||||
});
|
||||
|
||||
exampleResource.app.get('/foo', function (req, res) {
|
||||
res.send('foo!!!');
|
||||
});
|
Loading…
Reference in New Issue