You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-7
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,16 @@ Scripts built into [`package.json`](package.json):
19
19
20
20
| Command | Description
21
21
|---------------|-------------------
22
-
|npm run start| Will run both `npm run lift` and `npm run open:client` in parallel.
22
+
|npm run start| Will run both `npm run lift` and `npm run open:client` in parallel.
23
23
|npm run open:client | Will run the [Webpack Dev Server](https://webpack.js.org/configuration/dev-server/) and open a browser tab / window.
24
-
|npm run lift | The same thing as `sails lift` or `node app.js`; will "[lift our Sails](https://sailsjs.com/documentation/reference/command-line-interface/sails-lift)" instance.
25
-
|npm run debug | Alias for `node --inspect app.js`.
26
-
|npm run build | Will run `npm run clean`, then will build production-ready files with Webpack in the `.tmp/public` folder.
27
-
|npm run build:dev | Same thing as `npm run build`, except that it will not optimize the files, retaining newlines and empty spaces.
28
-
|npm run clean | Will basically delete everything in the `.tmp` folder.
29
-
|npm run lines | Will count the lines of code in the project, minus `.gitignore`'d files, for funzies.
24
+
|npm run lift | The same thing as `sails lift` or `node app.js`; will "[lift our Sails](https://sailsjs.com/documentation/reference/command-line-interface/sails-lift)" instance.
25
+
|npm run debug | Alias for `node --inspect app.js`.
26
+
|npm run build | Will run `npm run clean`, then will build production-ready files with Webpack in the `.tmp/public` folder.
27
+
|npm run build:dev | Same thing as `npm run build`, except that it will not optimize the files, retaining newlines and empty spaces.
28
+
|npm run clean | Will basically delete everything in the `.tmp` folder.
29
+
|npm run lines | Will count the lines of code in the project, minus `.gitignore`'d files, for funzies. There are currently about **6k** custom lines in this repo (views, controllers, helpers, hooks, etc).
30
+
|npm run test | Run [Mocha](https://mochajs.org/) tests. Everything starts in the [`test/hooks.js`](test/hooks.js) file.
31
+
|npm run coverage | Runs [NYC](https://www.npmjs.com/package/nyc) coverage reporting of the Mocha tests, which generates HTML in `test/coverage`.
30
32
31
33
## Request Logging
32
34
Automatic incoming request logging, is a 2 part process. First, the [`request-logger` hook](api/hooks/request-logger.js) gathers info from the quest, and creates a new [`RequestLog` record](api/models/RequestLog.js), making sure to mask anything that may be sensitive, such as passwords. Then, a custom response gathers information from the response, again, scrubbing sensitive data (using the [customToJSON](https://sailsjs.com/documentation/concepts/models-and-orm/model-settings?identity=#customtojson) feature of Sails models) to prevent leaking of password hashes, or anything else that should never be publicly accessible. The [`keepModelsSafe` helper](api/helpers/keep-models-safe.js) and the custom responses (such as [ok](api/responses/ok.js) or [serverError](api/responses/serverError.js)) are responsible for the final leg of request logs.
0 commit comments