Skip to content

Commit eaaf6de

Browse files
authored
Merge pull request #410 from danielroe/module-installation
docs: use new `nuxi module add` command in installation
2 parents c1e8bd8 + 41cdbfb commit eaaf6de

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,7 @@ Automatically configure your app to follow OWASP security patterns and principle
2929
Install the module:
3030

3131
```sh
32-
npm i -D nuxt-security
33-
yarn add -D nuxt-security
34-
pnpm add -D nuxt-security
35-
```
36-
37-
Add the module in the `modules` array in `nuxt.config.ts`:
38-
39-
```js
40-
export default defineNuxtConfig({
41-
modules: ["nuxt-security"],
42-
})
32+
npx nuxi@latest module add security
4333
```
4434

4535
And that's it! The module will now register route rules and server middlewares globally so that your application will be more secured.

docs/content/1.documentation/1.getting-started/1.setup.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,8 @@ Having more secure Nuxt project is only one command away ✨
77
:ellipsis{right=0px width=75% blur=150px}
88

99
Install `nuxt-security` module:
10-
11-
::code-group
12-
13-
```bash [Yarn]
14-
yarn add --dev nuxt-security
15-
```
16-
17-
```bash [NPM]
18-
npm install nuxt-security --save-dev
19-
```
20-
21-
```bash [PNPM]
22-
pnpm add -D nuxt-security
23-
```
24-
25-
::
26-
27-
Add it to `modules` in your `nuxt.config`:
28-
29-
```js{}[nuxt.config.ts]
30-
export default defineNuxtConfig({
31-
modules: ['nuxt-security']
32-
})
10+
```bash
11+
npx nuxi@latest module add security
3312
```
3413

3514
That's it! The Nuxt Security module will now register routeRules and middleware to make your application more secure ✨

0 commit comments

Comments
 (0)