Skip to content

Commit ef94c18

Browse files
committed
renaming from ldnode to solid-server
1 parent 6ebc535 commit ef94c18

File tree

16 files changed

+115
-283
lines changed

16 files changed

+115
-283
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# CONTRIBUTING
22

3-
The MIT Linked Data group and the `ldnode` project welcomes new contributors. This document will guide you
3+
The MIT Linked Data group and the `solid` project welcomes new contributors. This document will guide you
44
through the process.
55

66
### Step 1: FORK
77

8-
Fork the project [on GitHub](https://github.com/linkeddata/ldnode) and check out
8+
Fork the project [on GitHub](https://github.com/solid/node-solid-server) and check out
99
your copy.
1010

1111
```sh
12-
$ git clone git@github.com:your_username/ldnode.git
13-
$ cd ldnode
14-
$ git remote add upstream git://github.com/linkeddata/ldnode.git
12+
$ git clone git@github.com:your_username/node-solid-server.git
13+
$ cd node-solid-server
14+
$ git remote add upstream git://github.com/solid/node-solid-server.git
1515
```
1616

1717

@@ -93,7 +93,7 @@ Makeall tests pass. Please, do not submit patches that fail either check.
9393
$ git push origin my-feature-branch
9494
```
9595

96-
Go to https://github.com/username/ldnode and select your feature branch. Click
96+
Go to https://github.com/username/node-solid-server and select your feature branch. Click
9797
the 'Pull Request' button and fill out the form.
9898

9999
Pull requests are usually reviewed within a few days. If there are comments
@@ -116,8 +116,8 @@ $ npm version patch && npm publish && git push --follow-tags
116116
The described guidelines can be resumed as following:
117117

118118
```bash
119-
$ git clone https://github.com/linkeddata/ldnode
120-
$ cd ldnode
119+
$ git clone https://github.com/solid/node-solid-server
120+
$ cd node-solid-server
121121

122122
# to fork the repository
123123
$ hub fork
@@ -135,4 +135,4 @@ $ hub pull-request
135135
This document is forked from [joyent/node](https://github.com/joyent/node/blob/master/CONTRIBUTING.md)
136136

137137

138-
[issue tracker]: https://github.com/linkeddata/ldnode/issues
138+
[issue tracker]: https://github.com/solid/node-solid-server/issues

EXAMPLES.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
Examples
22
========
33

4-
ldnode binary
4+
solid binary
55
-------------
66

7-
ldnode can be started on its own by using the ldnode binary. Below are some examples with common configurations.
7+
solid can be started on its own by using the solid binary. Below are some examples with common configurations.
88

9-
* Starting ldnode as an HTTP server.
9+
* Starting solid as an HTTP server.
1010

11-
`$ ldnode --root /var/www`
11+
`$ solid --root /var/www`
1212

13-
* Starting ldnode as an HTTPS server with WebID+TLS authentication. This parameter requires that the user specifies the location of the key and the certificate used to start the HTTPS server with the help of the appropriate parameters.
13+
* Starting solid as an HTTPS server with WebID+TLS authentication. This parameter requires that the user specifies the location of the key and the certificate used to start the HTTPS server with the help of the appropriate parameters.
1414

15-
`$ ldnode --root /var/www --webid --cert ./cert.pem --key ./key.pem`
15+
`$ solid --root /var/www --webid --cert ./cert.pem --key ./key.pem`
1616

17-
* Start HTTPS with custom error pages. ldnode will look for a file in the specified directory of the form <error-code>.html. If it's not found it will default to node's error page.
17+
* Start HTTPS with custom error pages. solid will look for a file in the specified directory of the form <error-code>.html. If it's not found it will default to node's error page.
1818

19-
`$ ldnode --root /var/www/ --webid --cert ./cert.pem --key ./key.pem --error-pages ./errors/`
19+
`$ solid --root /var/www/ --webid --cert ./cert.pem --key ./key.pem --error-pages ./errors/`
2020

21-
* ldnode makes use of special files used for things such as access control, metadata management, subscription to changes, etc. These files are recognized by ldnode because of their suffix, which can be customized with the command line options that start with 'suffix'.
21+
* solid makes use of special files used for things such as access control, metadata management, subscription to changes, etc. These files are recognized by solid because of their suffix, which can be customized with the command line options that start with 'suffix'.
2222

23-
`$ ldnode --root /var/www/ --suffixMeta .altMeta --suffixAcl .altAcl`
23+
`$ solid --root /var/www/ --suffixMeta .altMeta --suffixAcl .altAcl`
2424

25-
Starting ldnode from a Node script
25+
Starting solid from a Node script
2626
-------------------------------------
2727

28-
ldnode can be started from an existing node application. There are two options available: creating the ldnode server on its own or creating a router that can be attached to an existing Express app.
28+
solid can be started from an existing node application. There are two options available: creating the solid server on its own or creating a router that can be attached to an existing Express app.
2929

30-
For the first case, the createServer is a wrapper around the ldnode method which can be used as follows:
30+
For the first case, the createServer is a wrapper around the solid method which can be used as follows:
3131

3232
```
33-
var ldnode = require('ldnode');
33+
var solid = require('solid-server');
3434
var options = {
3535
root: /var/www/
36-
} //an object specifying ldnode options (equivalent to the options provided by the command line interface).
36+
} //an object specifying solid options (equivalent to the options provided by the command line interface).
3737
var server;
38-
var app = ldnode.createServer(options);
38+
var app = solid.createServer(options);
3939
app.listen(8080);
4040
```
4141

42-
In the second case, the ldnode method is used directly and the returned express app can be combined with an existing application.
42+
In the second case, the solid method is used directly and the returned express app can be combined with an existing application.
4343

4444
```
45-
var existingApp; //Some existing Express app independent of ldnode.
45+
var existingApp; //Some existing Express app independent of solid.
4646
// ... Existing app initialization ...
47-
var app = ldnode(options);
47+
var app = solid(options);
4848
exisingApp.use('/mount-point', app);
4949
```
5050

README.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# ldnode
1+
# solid-sever in NodeJS
22

3-
[![Build Status](https://travis-ci.org/linkeddata/ldnode.svg?branch=master)](https://travis-ci.org/linkeddata/ldnode)
4-
[![NPM Version](https://img.shields.io/npm/v/ldnode.svg?style=flat)](https://npm.im/ldnode)
5-
[![Gitter chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat)](http://gitter.im/linkeddata/ldnode)
3+
[![Build Status](https://travis-ci.org/solid/node-solid-server.svg?branch=master)](https://travis-ci.org/solid/node-solid-server)
4+
[![NPM Version](https://img.shields.io/npm/v/solid-server.svg?style=flat)](https://npm.im/solid-server)
5+
[![Gitter chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat)](http://gitter.im/solid/node-solid-server)
66

77
> [Solid](https://github.com/solid) server in [NodeJS](https://nodejs.org/)
88
9-
Ldnode lets you run a Solid server on top of the file-system. You can use it as a [command-line tool](https://github.com/linkeddata/ldnode/blob/master/README.md#command-line-usage) (easy) or as a [library](https://github.com/linkeddata/ldnode/blob/master/README.md#library-usage) (advanced).
9+
`solid-server` lets you run a Solid server on top of the file-system. You can use it as a [command-line tool](https://github.com/solid/node-solid-server/blob/master/README.md#command-line-usage) (easy) or as a [library](https://github.com/solid/node-solid-server/blob/master/README.md#library-usage) (advanced).
1010

1111
## Solid Features supported
1212
- [x] [Linked Data Platform](http://www.w3.org/TR/ldp/)
@@ -25,51 +25,51 @@ Ldnode lets you run a Solid server on top of the file-system. You can use it as
2525
To install, first install [Node](https://nodejs.org/en/) and then run the following
2626

2727
```bash
28-
$ npm install -g ldnode
28+
$ npm install -g solid-server
2929
```
3030

3131
### Run a single-user server (beginner)
3232

33-
To run your server, simply run `ldnode` with the following flags:
33+
To run your server, simply run `solid` with the following flags:
3434

3535
```bash
36-
$ ldnode --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
37-
# Solid server (ldnode v0.2.24) running on https://localhost:8443/
36+
$ solid --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
37+
# Solid server (solid v0.2.24) running on https://localhost:8443/
3838
```
3939

40-
First time user? If you have never run `ldnode` before, let's get you a WebID to access your server.
40+
First time user? If you have never run `solid` before, let's get you a WebID to access your server.
4141
```bash
42-
$ ldnode --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
42+
$ solid --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
4343
# Action required: Create your admin account on https://localhost:8080/
4444
# When done, stop your server (<ctrl>+c) and restart without "--create-admin"
4545
```
4646

47-
If you want to run `ldnode` on a particular folder (different from the one you are in, e.g. `path/to/folder`):
47+
If you want to run `solid` on a particular folder (different from the one you are in, e.g. `path/to/folder`):
4848
```bash
49-
$ ldnode --root path/to/folder --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
50-
# Solid server (ldnode v0.2.24) running on https://localhost:8443/
49+
$ solid --root path/to/folder --port 8443 --ssl-key path/to/ssl-key.pem --ssl-cert path/to/ssl-cert.pem
50+
# Solid server (solid v0.2.24) running on https://localhost:8443/
5151
```
5252

5353
##### How do I get the --ssl-key and the --ssl-cert?
5454
You need an SSL certificate you get this from your domain provider or for free from [Let's Encrypt!](https://letsencrypt.org/getting-started/).
5555

56-
If you don't have one yet, or you just want to test `ldnode`, generate a certificate (**DO NOT USE IN PRODUCTION**):
56+
If you don't have one yet, or you just want to test `solid`, generate a certificate (**DO NOT USE IN PRODUCTION**):
5757
```
5858
$ openssl genrsa 2048 > ../localhost.key
5959
$ openssl req -new -x509 -nodes -sha256 -days 3650 -key ../localhost.key -subj '/CN=*.localhost' > ../localhost.cert
6060
```
6161

6262
### Run multi-user server (intermediate)
6363

64-
You can run `ldnode` so that new users can sign up, in other words, get their WebIDs _username.yourdomain.com_.
64+
You can run `solid` so that new users can sign up, in other words, get their WebIDs _username.yourdomain.com_.
6565

6666
Pre-requisites:
6767
- Get a [Wildcard Certificate](https://en.wikipedia.org/wiki/Wildcard_certificate)
6868
- Add a Wildcard DNS record in your DNS zone (e.g.`*.yourdomain.com`)
6969
- (If you are running locally) Add the line `127.0.0.1 *.localhost` to `/etc/hosts`
7070

7171
```bash
72-
$ ldnode --allow-signup --port 8443 --cert /path/to/cert --key /path/to/key --root ./accounts
72+
$ solid --allow-signup --port 8443 --cert /path/to/cert --key /path/to/key --root ./accounts
7373
```
7474

7575
Your users will have a dedicated folder under `./accounts`. Also, your root domain's website will be in `./accounts/yourdomain.tld`. New users can create accounts on `/accounts/new` and create new certificates on `/accounts/cert`. An easy-to-use sign-up tool is found on `/accounts`.
@@ -79,9 +79,9 @@ If you don't want WebID Authentication and Web Access Control, you can run a sim
7979

8080
```bash
8181
# over HTTP
82-
$ ldnode --port 8080 --no-webid
82+
$ solid --port 8080 --no-webid
8383
# over HTTPS
84-
$ ldnode --port 8080 --ssl-key key.pem --ssl-cert cert.pem --no-webid
84+
$ solid --port 8080 --ssl-key key.pem --ssl-cert cert.pem --no-webid
8585
```
8686

8787
**Note:** if you want to run on HTTP, do not pass the `--ssl-*` flags, but keep `--no-webid`
@@ -91,10 +91,10 @@ $ ldnode --port 8080 --ssl-key key.pem --ssl-cert cert.pem --no-webid
9191
The command line tool has the following options
9292

9393
```
94-
Usage: ldnode [options]
94+
Usage: solid [options]
9595
9696
Options:
97-
--version Print current ldnode version
97+
--version Print current solid version
9898
-v, --verbose Print the logs to console
9999
100100
--root Root folder to serve (defaut: './')
@@ -106,9 +106,9 @@ Options:
106106
107107
--create-admin Allow a user to set up their initial identity in single-user mode
108108
--no-live Disable live support through WebSockets
109-
--default-app URI to use as a default app for resources (default: https://linkeddata.github.io/warp/#/list/)
109+
--default-app URI to use as a default app for resources (default: https://solid.github.io/warp/#/list/)
110110
--proxy Use a proxy on example.tld/proxyPath
111-
--file-browser URI to use as a default app for resources (default: https://linkeddata.github.io/warp/#/list/)
111+
--file-browser URI to use as a default app for resources (default: https://solid.github.io/warp/#/list/)
112112
--data-browser Enable viewing RDF resources using a default data browser application (e.g. mashlib)
113113
--suffix-acl Suffix for acl files (default: '.acl')
114114
--suffix-meta Suffix for metadata files (default: '.meta')
@@ -132,7 +132,7 @@ npm install
132132

133133
The library provides two APIs:
134134

135-
- `ldnode.createServer(settings)`: starts a ready to use
135+
- `solid.createServer(settings)`: starts a ready to use
136136
[Express](http://expressjs.com) app.
137137
- `lnode(settings)`: creates an [Express](http://expressjs.com) that you can
138138
mount in your existing express app.
@@ -158,16 +158,16 @@ default settings.
158158
```
159159

160160
Have a look at the following examples or in the
161-
[`examples/`](https://github.com/linkeddata/ldnode/tree/master/examples) folder
161+
[`examples/`](https://github.com/solid/node-solid-server/tree/master/examples) folder
162162
for more complex ones
163163

164164
##### Simple Example
165165

166-
You can create an `ldnode` server ready to use using `ldnode.createServer(opts)`
166+
You can create an `solid` server ready to use using `solid.createServer(opts)`
167167

168168
```javascript
169-
var ldnode = require('ldnode')
170-
var ldp = ldnode.createServer({
169+
var solid = require('solid-server')
170+
var ldp = solid.createServer({
171171
key: '/path/to/sslKey.pem',
172172
cert: '/path/to/sslCert.pem',
173173
webid: true
@@ -179,13 +179,13 @@ ldp.listen(3000, function() {
179179

180180
##### Advanced Example
181181

182-
You can integrate `ldnode` in your existing [Express](https://expressjs.org)
183-
app, by mounting the `ldnode` app on a specific path using `lnode(opts)`.
182+
You can integrate `solid` in your existing [Express](https://expressjs.org)
183+
app, by mounting the `solid` app on a specific path using `lnode(opts)`.
184184

185185
```javascript
186-
var ldnode = require('ldnode')
186+
var solid = require('solid-server')
187187
var app = require('express')()
188-
app.use('/test', ldnode(yourSettings))
188+
app.use('/test', solid(yourSettings))
189189
app.listen(3000, function() {
190190
// Started Express app with ldp on '/test'
191191
})
@@ -197,20 +197,20 @@ app.listen(3000, function() {
197197
Run your app with the `DEBUG` variable set:
198198

199199
```bash
200-
$ DEBUG="ldnode:*" node app.js
200+
$ DEBUG="solid:*" node app.js
201201
```
202202

203-
## Testing `ldnode` Locally
203+
## Testing `solid` Locally
204204

205205
#### Pre-Requisites
206206

207-
In order to really get a feel for the Solid platform, and to test out `ldnode`,
207+
In order to really get a feel for the Solid platform, and to test out `solid`,
208208
you will need the following:
209209

210210
1. A WebID profile and browser certificate from one of the Solid-compliant
211211
identity providers, such as [databox.me](https://databox.me).
212212

213-
2. A server-side SSL certificate for `ldnode` to use (see the section below
213+
2. A server-side SSL certificate for `solid` to use (see the section below
214214
on creating a self-signed certificate for testing).
215215

216216
While these steps are technically optional (since you could launch it in
@@ -219,7 +219,7 @@ without them.
219219

220220
#### Creating a certificate for local testing
221221

222-
When deploying `ldnode` in production, we recommend that you go the
222+
When deploying `solid` in production, we recommend that you go the
223223
usual Certificate Authority route to generate your SSL certificate (as you
224224
would with any website that supports HTTPS). However, for testing it locally,
225225
you can easily generate a self-signed certificate for whatever domain you're
@@ -230,37 +230,37 @@ using the `openssl` library:
230230

231231
```bash
232232

233-
ldnode --webid --port 8443 --cert ../localhost.cert --key ../localhost.key -v
233+
solid --webid --port 8443 --cert ../localhost.cert --key ../localhost.key -v
234234
```
235235

236236
Note that this example creates the `localhost.cert` and `localhost.key` files
237237
in a directory one level higher from the current, so that you don't
238-
accidentally commit your certificates to `ldnode` while you're developing.
238+
accidentally commit your certificates to `solid` while you're developing.
239239

240240
#### Accessing your server
241241

242-
If you started your `ldnode` server locally on port 8443 as in the example
242+
If you started your `solid` server locally on port 8443 as in the example
243243
above, you would then be able to visit `https://localhost:8443` in the browser
244244
(ignoring the Untrusted Connection browser warnings as usual), where your
245-
`ldnode` server would redirect you to the default viewer app (see the
245+
`solid` server would redirect you to the default viewer app (see the
246246
`--file-browser` server config parameter), which is usually the
247-
[github.io/warp](https://linkeddata.github.io/warp/#/list/) file browser.
247+
[github.io/warp](https://solid.github.io/warp/#/list/) file browser.
248248

249249
Accessing most Solid apps (such as Warp) will prompt you to select your browser
250250
side certificate which contains a WebID from a Solid storage provider (see
251251
the [pre-requisites](#pre-requisites) discussion above).
252252

253253
#### Editing your local `/etc/hosts`
254254

255-
To test certificates and account creation on subdomains, `ldnode`'s test suite
255+
To test certificates and account creation on subdomains, `solid`'s test suite
256256
uses the following localhost domains: `nic.localhost`, `tim.localhost`, and
257257
`nicola.localhost`. You will need to create host file entries for these, in
258258
order for the tests to pass.
259259

260260
Edit your `/etc/hosts` file, and append:
261261

262262
```
263-
# Used for unit testing ldnode
263+
# Used for unit testing solid
264264
127.0.0.1 nic.localhost, tim.localhost, nicola.localhost
265265
```
266266

@@ -269,7 +269,7 @@ Edit your `/etc/hosts` file, and append:
269269
```bash
270270
$ npm test
271271
# running the tests with logs
272-
$ DEBUG="ldnode:*" npm test
272+
$ DEBUG="solid:*" npm test
273273
```
274274

275275
In order to test a single component, you can run
@@ -281,7 +281,7 @@ npm run test-(acl|formats|params|patch)
281281

282282
## Contributing
283283

284-
`ldnode` is only possible due to the excellent work of the following contributors:
284+
`solid` is only possible due to the excellent work of the following contributors:
285285

286286
<table>
287287
<tbody>
@@ -314,11 +314,11 @@ npm run test-(acl|formats|params|patch)
314314

315315
#### Do you want to contribute?
316316

317-
- [Join us in Gitter](https://gitter.im/linkeddata/chat) to help with development or to hang out with us :)
318-
- [Create a new issue](https://github.com/linkeddata/ldnode/issues/new) to report bugs
319-
- [Fix an issue](https://github.com/linkeddata/ldnode/issues)
317+
- [Join us in Gitter](https://gitter.im/solid/chat) to help with development or to hang out with us :)
318+
- [Create a new issue](https://github.com/solid/node-solid-server/issues/new) to report bugs
319+
- [Fix an issue](https://github.com/solid/node-solid-server/issues)
320320

321-
Have a look at [CONTRIBUTING.md](https://github.com/linkeddata/ldnode/blob/master/CONTRIBUTING.md).
321+
Have a look at [CONTRIBUTING.md](https://github.com/solid/node-solid-server/blob/master/CONTRIBUTING.md).
322322

323323
## License
324324

0 commit comments

Comments
 (0)