Skip to content

Commit

Permalink
Update README Example (#89)
Browse files Browse the repository at this point in the history
Start server with port mentioned in the following documentation and make it more obvious where `knexService` is imported from.
  • Loading branch information
arlair authored and daffl committed Dec 21, 2016
1 parent 6a527c9 commit ed6e0fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Here's a complete example of a Feathers server with a `todos` SQLite service. We
import feathers from 'feathers';
import rest from 'feathers-rest';
import bodyParser from 'body-parser';
import knexService from '../lib';
import knexService from 'feathers-knex';

const knex = require('knex')({
client: 'sqlite3',
Expand Down Expand Up @@ -80,7 +80,11 @@ app.use(function(error, req, res, next){
res.json(error);
});

console.log('Feathers Todo Knex service running on 127.0.0.1:3030');
// Start the server.
const port = 8080;
app.listen(port, function() {
console.log(`Feathers server listening on port ${port}`);
});
```

You can run this example by using `node server` and going to [localhost:8080/todos](http://localhost:8080/todos). You should see an empty array. That's because you don't have any Todos yet but you now have full CRUD for your new todos service!
Expand Down

0 comments on commit ed6e0fd

Please sign in to comment.