Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Fixing .npmignore and updating README and example
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Jan 23, 2016
1 parent 32c8e56 commit f04061a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 35 deletions.
4 changes: 4 additions & 0 deletions .babelrc
@@ -0,0 +1,4 @@
{
"plugins": [ "add-module-exports" ],
"presets": [ "es2015" ]
}
7 changes: 6 additions & 1 deletion .npmignore
@@ -1,4 +1,9 @@
.editorconfig
.npmignore
.jshintrc
.travis.yml
.babelrc
.idea/
src/
test/
!lib/
!lib/
18 changes: 8 additions & 10 deletions README.md
Expand Up @@ -25,17 +25,15 @@ Please refer to the [Feathers database adapter documentation](http://docs.feathe
Here is an example of a Feathers server with a `todos` in-memory service that supports pagination:

```js
// app.js
var feathers = require('feathers');
var bodyParser = require('body-parser');
var memory = require('feathers-memory');
import feathers from 'feathers';
import bodyParser from 'body-parser';
import rest from 'feathers-rest';
import memory from '../lib';

// Create a feathers instance.
var app = feathers()
// Enable Socket.io
.configure(feathers.socketio())
const app = feathers()
// Enable REST services
.configure(feathers.rest())
.configure(rest())
// Turn on JSON parser for REST services
.use(bodyParser.json())
// Turn on URL-encoded parser for REST services
Expand All @@ -62,11 +60,11 @@ app.service('todos').create({
var port = 3030;

app.listen(port, function() {
console.log('Feathers server listening on port ' + port);
console.log(`Feathers server listening on port ${port}`);
});
```

You can run this example by using `node examples/app` and going to [localhost:3030/todos](http://localhost:3030/todos). You will see the test Todo that we created at the end of that file.
You can run this example by using `npm run example` and going to [localhost:3030/todos](http://localhost:3030/todos). You will see the test Todo that we created at the end of that file.


## Changelog
Expand Down
15 changes: 7 additions & 8 deletions example/app.js
@@ -1,13 +1,12 @@
var feathers = require('feathers');
var bodyParser = require('body-parser');
var memory = require('../lib');
import feathers from 'feathers';
import bodyParser from 'body-parser';
import rest from 'feathers-rest';
import memory from '../lib';

// Create a feathers instance.
var app = feathers()
// Enable Socket.io
.configure(feathers.socketio())
const app = feathers()
// Enable REST services
.configure(feathers.rest())
.configure(rest())
// Turn on JSON parser for REST services
.use(bodyParser.json())
// Turn on URL-encoded parser for REST services
Expand All @@ -25,4 +24,4 @@ app.use('/todos', memory({
// Start the server
module.exports = app.listen(3030);

console.log('Feathers Todo memory service running on 127.0.0.1:3030');
console.log('Feathers Todo memory service running on 127.0.0.1:3030');
21 changes: 5 additions & 16 deletions package.json
Expand Up @@ -8,12 +8,7 @@
"feathers",
"feathers-plugin"
],
"license": [
{
"type": "MIT",
"url": "https://github.com/feathersjs/feathers-memory/blob/master/LICENSE"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/feathersjs/feathers-memory.git"
Expand All @@ -40,15 +35,18 @@
"watch": "babel --watch -d lib/ src/",
"jshint": "jshint src/. test/. --config",
"mocha": "mocha test/ --compilers js:babel-core/register",
"test": "npm run compile && npm run jshint && npm run mocha && nsp check"
"test": "npm run compile && npm run jshint && npm run mocha && nsp check",
"example": "babel-node example/app.js"
},
"directories": {
"lib": "lib"
},
"dependencies": {
"babel-polyfill": "^6.2.0",
"feathers": "^2.0.0-pre.4",
"feathers-errors": "^1.1.4",
"feathers-query-filters": "^1.1.1",
"feathers-rest": "^1.1.1",
"lodash": "^3.10.1",
"uberproto": "^1.2.0"
},
Expand All @@ -58,18 +56,9 @@
"babel-plugin-add-module-exports": "^0.1.1",
"babel-preset-es2015": "^6.1.2",
"body-parser": "^1.14.1",
"feathers": "^1.1.1",
"feathers-service-tests": "^0.5.0",
"jshint": "^2.8.0",
"mocha": "^2.3.3",
"nsp": "^2.2.0"
},
"babel": {
"plugins": [
"add-module-exports"
],
"presets": [
"es2015"
]
}
}

0 comments on commit f04061a

Please sign in to comment.