Skip to content

Commit 2b5e48c

Browse files
committed
Updated notations in application tutorial
1 parent 660a80a commit 2b5e48c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/v3/tutorial/application/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To create a new application package, run the following command inside your OS.js
2424

2525
The `metadata.json` file describes your application and contains a list of files that is required to load the it.
2626

27-
> Remember to run `npm run package:discover` after you change your metadata.
27+
> [info] Remember to run `npm run package:discover` after you change your metadata.
2828
2929
```json
3030
{
@@ -175,7 +175,7 @@ For internal events, see [Core Tutorial](../core/README.md)
175175
You can get an URL to any resource bundled with your application using
176176
the resource method:
177177

178-
> Application resources are resolved as `/apps/{name}/{resource}`
178+
> [info] Application resources are resolved as `/apps/{name}/{resource}`
179179
180180
```javascript
181181
const url = proc.resource('/image.png');
@@ -194,7 +194,7 @@ import resource from './resource.ext';
194194

195195
You can set up your own HTTP routes using the internal APIs:
196196

197-
> Application endpoints are resolved as `/apps/{name}/{endpoint}`
197+
> [info] Application endpoints are resolved as `/apps/{name}/{endpoint}`
198198
199199
### Client
200200

@@ -209,7 +209,7 @@ console.log(response);
209209

210210
In your server script, create a matching endpoint with Express:
211211

212-
> You can access POST body data via `req.body` and GET parameters via `req.query`.
212+
> [info] You can access POST body data via `req.body` and GET parameters via `req.query`.
213213
214214
```javascript
215215
const {routeAuthenticated} = core.make('osjs/express');
@@ -259,7 +259,7 @@ module.exports = (core, proc) => ({
259259

260260
You can also create new WebSocket connections.
261261

262-
> Application endpoints are resolved as `/apps/{name}/{endpoint}`
262+
> [info] Application endpoints are resolved as `/apps/{name}/{endpoint}`
263263
264264
#### Client
265265

@@ -282,7 +282,9 @@ ws.close(); // Closes socket
282282

283283
In your server script, create a matching endpoint with Express:
284284

285-
> You can get the core Websocket server via `core.wss`. You can add properties to the `ws` object in the `app.ws()` method filter out the list of clients from `wss.clients`.
285+
> [info] You can get the core Websocket server via `core.wss`. You can add
286+
> properties to the `ws` object in the `app.ws()` method filter out the
287+
> list of clients from `wss.clients`.
286288
287289
```javascript
288290
const endpoint = proc.resource('/socket');
@@ -321,7 +323,8 @@ osjs.register(applicationName, (core, args, options, metadata) => {
321323

322324
When an application is launched, it might contain arguments:
323325

324-
> NOTE: If your application was launched with a file associated to an assigned MIME, the `file` property will be added automatically to the `args` object.
326+
> [info] If your application was launched with a file associated to an assigned
327+
> MIME, the `file` property will be added automatically to the `args` object.
325328
326329
```javascript
327330
// Launch application with arguments
@@ -374,5 +377,3 @@ Sessions are normally only saved when a user logs out, but you can force this ac
374377
```javascript
375378
core.make('osjs/session').save(); // Promise
376379
```
377-
378-
> Sessions are stored via the `Settings` API.

0 commit comments

Comments
 (0)