From ed6e0fd743dad4ae768cb2340ce5c76d0968a277 Mon Sep 17 00:00:00 2001 From: Arlair Date: Thu, 22 Dec 2016 00:16:05 +0800 Subject: [PATCH] Update README Example (#89) Start server with port mentioned in the following documentation and make it more obvious where `knexService` is imported from. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2900203..9029646 100644 --- a/README.md +++ b/README.md @@ -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', @@ -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!