Skip to content

Commit fbf1d5b

Browse files
author
Nicola Greco
committed
Cleaning bits of README
1 parent 7451f8c commit fbf1d5b

1 file changed

Lines changed: 11 additions & 20 deletions

File tree

‎README.md‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Linked Data Platform server based on [rdflib.js](https://github.com/linkeddata/rdflib.js) and [node.js](https://nodejs.org/). This is all you need to run distributed linked data apps on top of the file system.
88

9-
You can run ldnode as a [command-line tool](https://github.com/linkeddata/ldnode/blob/master/README.md#command-line-tool) or as a [library](https://github.com/linkeddata/ldnode/blob/master/README.md#library) for your Nodejs/express app.
9+
You can run ldnode as a [command-line tool](https://github.com/linkeddata/ldnode/blob/master/README.md#command-line-tool) or as a [library](https://github.com/linkeddata/ldnode/blob/master/README.md#library) for your Nodejs/Express app.
1010

1111
## Features
1212

@@ -60,8 +60,8 @@ npm install
6060

6161
The library provides two APIs:
6262

63-
- `ldnode.createServer(settings)`: starts a ready to use Express app.
64-
- `lnode(settings)`: creates an Express routes that you can mount in your existing express app
63+
- `ldnode.createServer(settings)`: starts a ready to use [Express](http://expressjs.com) app.
64+
- `lnode(settings)`: creates an [Express](http://expressjs.com) that you can mount in your existing express app.
6565

6666
In case the `settings` is not passed, then it will start with the following default settings.
6767

@@ -82,28 +82,30 @@ In case the `settings` is not passed, then it will start with the following defa
8282
}
8383
```
8484

85-
8685
##### Simple
8786

88-
You can create an ldnode ready to use Express server using `ldnode.createServer(opts)`
87+
You can create an ldnode server ready to use using `ldnode.createServer(opts)`
8988

9089
```javascript
9190
var ldnode = require('ldnode')
92-
93-
var ldp = ldnode.createServer()
91+
var ldp = ldnode.createServer({
92+
key: '/path/to/sslKey.pem',
93+
cert: '/path/to/sslCert.pem',
94+
webid: true
95+
})
9496
ldp.listen(3000, function() {
9597
// Started Linked Data Platform
9698
})
9799
```
98100

99101
##### Advanced
100102

101-
You can integrate it with your existing express app just by using `lnode(opts)`
103+
You can integrate ldnode in your existing express app, by mounting the ldnode app on a specific path using `lnode(opts)`.
102104

103105
```javascript
104106
var ldnode = require('ldnode')
105107
var app = require('express')()
106-
app.use('/test', ldnode({ root:'/path/to/root/container' }))
108+
app.use('/test', ldnode(yourSettings))
107109
app.listen(3000, function() {
108110
// Started Express app with ldp on '/test'
109111
})
@@ -118,19 +120,8 @@ Run your app with the `DEBUG` variable set:
118120
$ DEBUG="ldnode:*" node app.js
119121
```
120122

121-
122-
## Package scripts
123-
124-
There are some scripts in the [package.json](https://github.com/linkeddata/ldnode/blob/master/package.json):
125-
126-
- `npm start`: starts a very basic ldnode with default configs
127-
- `npm run ldp-webid`: run ldnode with SSL and WebID+TLS enabled (remember it runs in HTTPS)
128-
- `npm run ldp-ssl`: same as the above without WebID+TLS support
129-
130123
## Tests
131124

132-
The tests assume that there is a running ldnode.
133-
134125
```bash
135126
$ npm test
136127
# running the tests with logs

0 commit comments

Comments
 (0)