Skip to content

Commit bb6fade

Browse files
authored
1 parent f13844c commit bb6fade

File tree

19 files changed

+213
-78
lines changed

19 files changed

+213
-78
lines changed

.vuepress/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ module.exports = {
113113
items: [{
114114
text: 'Awesome Feathersjs',
115115
link: 'https://github.com/feathersjs/awesome-feathersjs'
116+
}, {
117+
text: 'YouTube Playlist',
118+
link: 'https://www.youtube.com/playlist?list=PLwSdIiqnDlf_lb5y1liQK2OW5daXYgKOe'
116119
}, {
117120
text: 'Previous versions',
118121
items: [{

.vuepress/public/_redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# https://crow.docs.feathersjs.com/* https://docs.feathersjs.com/:splat 301!
1+
https://crow.docs.feathersjs.com/* https://docs.feathersjs.com/:splat 301!
22

33
# v2 Redirects
44

.vuepress/styles/index.styl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@require '~vuepress-plugin-tabs/dist/themes/default.styl'
2-
@import 'https://fonts.googleapis.com/css?family=Raleway&display=swap.css';
2+
@import 'https://fonts.googleapis.com/css?family=Raleway&display=swap.css';
3+
@import 'https://fonts.googleapis.com/css?family=Lato&display=swap.css'

.vuepress/theme/styles/index.styl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ html, body
1010
background-color #fff
1111

1212
body
13-
font-family 'Raleway', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif
13+
font-family 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif
1414
-webkit-font-smoothing antialiased
1515
-moz-osx-font-smoothing grayscale
1616
font-size 16px
@@ -20,6 +20,7 @@ body
2020
padding-left $sidebarWidth
2121

2222
.navbar
23+
font-family 'Raleway', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif
2324
position fixed
2425
z-index 20
2526
top 0
@@ -40,6 +41,7 @@ body
4041
display none
4142

4243
.sidebar
44+
font-family 'Raleway', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif
4345
font-size 16px
4446
background-color #fff
4547
width $sidebarWidth
@@ -104,6 +106,7 @@ strong
104106
font-weight 600
105107

106108
h1, h2, h3, h4, h5, h6
109+
font-family 'Raleway', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif
107110
font-weight 600
108111
line-height 1.25
109112
.content:not(.custom) > &

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Welcome to the FeathersJS documentation! Feathers is a web-framework for creatin
1111

1212
At its core, Feathers is a set of tools and an architecture pattern that make it easy to create scalable REST APIs and real-time applications. You can build prototypes in minutes and production-ready apps in days. To get started, follow one of the following links:
1313

14-
[__Read the guide to learn more and get started with Feathers >__](./guides/readme.md)
14+
[The Feathers guide >](./guides/readme.md)
1515

16-
[__Dig into the API documentation >__](./api/readme.md)
16+
[The API documentation >](./api/readme.md)
1717

18-
[__Check out the cookbook for common tasks and patterns >__](./cookbook/readme.md)
18+
[The cookbook for common tasks and patterns >](./cookbook/readme.md)
1919

20-
[__Have a look at frequently asked questions and other ways to get help >__](./help/readme.md)
20+
[FAQ and ways to get help >](./help/readme.md)
2121

22-
[__Migrate to the latest version >__](./guides/migrating.md)
22+
[Migrate to the latest version >](./guides/migrating.md)

api/assets/architecture-overview.svg

Lines changed: 1 addition & 0 deletions
Loading

api/authentication/client.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ Returns the instance of the [AuthenticationClient](#authenticationclient).
126126

127127
`app.authentication.reset()` resets the authentication state without explicitly logging out. Should not be called directly.
128128

129+
### handleError()
130+
131+
`app.authentication.handleError(error, type: 'authenticate'|'logout') -> Promise` handles any error happening in the `authenticate` or `logout` method. By default it removes the access token if the error is a `NotAuthenticate` error. Otherwise it does nothing.
132+
129133
### reAuthenticate(force)
130134

131135
`app.authentication.reAuthenticate(force = false) -> Promise` will re-authenticate with the current access token from [app.authentication.getAccessToken()](). If `force` is set to `true` it will always reauthenticate, with the default `false` only when not already authenticated.

api/authentication/oauth.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ To _link an existing user_ the current access token can be added the oAuth flow
9797
</a>
9898
```
9999

100-
This will use the user (entity) of that access token to link the oAuth account to.
100+
This will use the user (entity) of that access token to link the oAuth account to. Using the [authentication client](./client.md) you can get the current access token via `app.get('authentication')`:
101+
102+
```js
103+
const { accessToken } = await app.get('authentication');
104+
```
101105

102106
### Redirects
103107

@@ -113,11 +117,11 @@ The `redirect` configuration option is used to redirect back to the frontend app
113117
}
114118
```
115119

116-
Will redirect to `https://app.mydomain.com/#access_token=<user jwt>` or `https://app.mydomain.com/#error=<some error message>`. The [authentication client](./client.md) handles those redirect automatically. It can be customized with the [getRedirect()](#getredirect) method of the oAuth strategy.
120+
Will redirect to `https://app.mydomain.com/#access_token=<user jwt>` or `https://app.mydomain.com/#error=<some error message>`. Redirects can be customized with the [getRedirect()](#getredirect) method of the oAuth strategy. The [authentication client](./client.md) handles the default redirects automatically already.
117121

118-
> __Note:__ The redirect is using a hash instead of a query string by default because it is not logged server side and can be easily manipulated on the client.
122+
> __Note:__ The redirect is using a hash instead of a query string by default because it is not logged server side and can be easily read on the client.
119123
120-
If `redirect` option is not set, the authentication result data will be sent as JSON instead.
124+
If the `redirect` option is not set, the authentication result data will be sent as JSON instead.
121125

122126
## Setup (Express)
123127

api/client/rest.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ POST /messages
286286
]
287287
```
288288

289+
> **Note:** With a [database adapters](../databases/adapters.md) the [`multi` option](./databases/common.md) has to be set explicitly to support creating multiple entries.
290+
289291
### update
290292

291293
Completely replace a single or multiple resources.
@@ -324,6 +326,8 @@ PATCH /messages?complete=false
324326

325327
Will call `messages.patch(null, { complete: true }, { query: { complete: 'false' } })` on the server to change the status for all read messages.
326328

329+
> **Note:** With a [database adapters](../databases/adapters.md) the [`multi` option](./databases/common.md) has to be set to support patching multiple entries.
330+
327331
This is supported out of the box by the Feathers [database adapters](../databases/adapters.md)
328332

329333
### remove
@@ -343,3 +347,5 @@ DELETE /messages?read=true
343347
```
344348

345349
Will call `messages.remove(null, { query: { read: 'true' } })` to delete all read messages.
350+
351+
> **Note:** With a [database adapters](../databases/adapters.md) the [`multi` option](./databases/common.md) has to be set to support patching multiple entries.

api/readme.md

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,58 @@
11
# API
22

3-
This section describes all the APIs of Feathers and its individual modules.
4-
5-
* __Core:__ Feathers core functionality
6-
* [Application](application.md) - The main Feathers application API
7-
* [Services](services.md) - Service objects and their methods and Feathers specific functionality
8-
* [Hooks](hooks.md) - Pluggable middleware for service methods
9-
* [Events](events.md) - Events sent by Feathers service methods
10-
* [Errors](errors.md) - A collection of error classes used throughout Feathers
11-
* [Configuration](configuration.md) - A node-config wrapper to initialize configuration of a server side application.
12-
* __Transports:__ Expose a Feathers application as an API server
3+
This section describes all the individual modules and APIs of Feathers. There are three main sections of the API:
4+
5+
- __Core:__ The Feathers core functionality that can be used on the server and the client
6+
- __Server:__ Feathers server side modules used with Core when creating an API server in NodeJS
7+
- __Client:__ Modules used on the client (NodeJS, browser or React Native) together with Core when connecting to a Feathers API server.
8+
9+
Here is an overview how the individual sections of the API documentation fit together:
10+
11+
![Feathers Architecture overview](./assets/architecture-overview.svg)
12+
13+
## Core
14+
15+
Feathers core functionality that works on the client and the server
16+
17+
* [Application](application.md) - The main Feathers application API
18+
* [Services](services.md) - Service objects and their methods and Feathers specific functionality
19+
* [Hooks](hooks.md) - Pluggable middleware for service methods
20+
* [Events](events.md) - Events sent by Feathers service methods
21+
* [Errors](errors.md) - A collection of error classes used throughout Feathers
22+
23+
## Transports
24+
25+
Expose a Feathers application as an API server
1326
* [Express](express.md) - Feathers Express framework bindings, REST API provider and error middleware.
1427
* [Socket.io](socketio.md) - The Socket.io real-time transport provider
1528
* [Primus](primus.md) - The Primus real-time transport provider
29+
* [Configuration](configuration.md) - A node-config wrapper to initialize configuration of a server side application.
1630
* [Channels](channels.md) - Decide what events to send to connected real-time clients
17-
* __Client:__ More details on how to use Feathers on the client
18-
* [Usage](client.md) - Feathers client usage in Node, React Native and the browser (also with Webpack and Browserify)
19-
* [REST](client/rest.md) - Feathers client and direct REST API server usage
20-
* [Socket.io](client/socketio.md) - Feathers client and direct Socket.io API server usage
21-
* [Primus](client/primus.md) - Feathers client and direct Primus API server usage
22-
* __Authentication:__ Feathers authentication mechanism
23-
* [Service](authentication/service.md) - The main authentication service configuration
24-
* [Strategies](authentication/strategy.md) - More about authentication strategies
25-
* [Local](authentication/local.md) - Local email/password authentication
26-
* [JWT](authentication/jwt.md) - JWT authentication
27-
* [OAuth](authentication/oauth.md) - Using oAuth logins (Facebook, Twitter etc.)
28-
* [Client](authentication/client.md) - A client for a Feathers authentication server
29-
* __Database:__ Feathers common database adapter API and querying mechanism
30-
* [Adapters](databases/adapters.md) - A list of supported database adapters
31-
* [Common API](databases/common.md) - Database adapter common initialization and configuration API
32-
* [Querying](databases/querying.md) - The common querying mechanism
31+
32+
## Client
33+
34+
More details on how to use Feathers on the client
35+
36+
* [Usage](client.md) - Feathers client usage in Node, React Native and the browser (also with Webpack and Browserify)
37+
* [REST](client/rest.md) - Feathers client and direct REST API server usage
38+
* [Socket.io](client/socketio.md) - Feathers client and direct Socket.io API server usage
39+
* [Primus](client/primus.md) - Feathers client and direct Primus API server usage
40+
41+
## Authentication
42+
43+
Feathers authentication mechanism
44+
45+
* [Service](authentication/service.md) - The main authentication service configuration
46+
* [Strategies](authentication/strategy.md) - More about authentication strategies
47+
* [Local](authentication/local.md) - Local email/password authentication
48+
* [JWT](authentication/jwt.md) - JWT authentication
49+
* [OAuth](authentication/oauth.md) - Using oAuth logins (Facebook, Twitter etc.)
50+
* [Client](authentication/client.md) - A client for a Feathers authentication server
51+
52+
## Databases
53+
54+
Feathers common database adapter API and querying mechanism
55+
56+
* [Adapters](databases/adapters.md) - A list of supported database adapters
57+
* [Common API](databases/common.md) - Database adapter common initialization and configuration API
58+
* [Querying](databases/querying.md) - The common querying mechanism

0 commit comments

Comments
 (0)