File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ npm install db0 better-sqlite3 bcrypt nodemailer
1717npx nuxt-users migrate
1818
1919# Create your first user
20- npx nuxt-users create-user admin@example.com " Admin User" password123
20+ npx nuxt-users create-user -e admin@example.com -n " Admin User" -p password123 -r admin
2121```
2222
2323``` ts
@@ -408,7 +408,7 @@ ls -la ./database/users.db
408408
409409``` bash
410410# Create a test user
411- npx nuxt-users create-user test@example.com " Test User" password123
411+ npx nuxt-users create-user -e test@example.com -n " Test User" -p password123
412412
413413# Verify user was created (optional)
414414sqlite3 ./data/users.sqlite3 " SELECT * FROM users;"
@@ -460,7 +460,7 @@ npm install nuxt-users
460460npx nuxt-users migrate
461461
462462# Create user
463- npx nuxt-users create-user email@example.com " Name" password
463+ npx nuxt-users create-user -e email@example.com -n " Name" -p password
464464
465465# Start development
466466npm run dev
Original file line number Diff line number Diff line change @@ -189,16 +189,16 @@ You can create users with specific roles using the CLI:
189189
190190``` bash
191191# Create a standard user
192- npx nuxt-users create-user user@example.com " John Doe" password123 user
192+ npx nuxt-users create-user -e user@example.com -n " John Doe" -p password123 -r user
193193
194194# Create an admin user
195- npx nuxt-users create-user admin@example.com " Admin User" adminpass123 admin
195+ npx nuxt-users create-user -e admin@example.com -n " Admin User" -p adminpass123 -r admin
196196
197197# Create an editor user
198- npx nuxt-users create-user editor@example.com " Editor User" editorpass123 editor
198+ npx nuxt-users create-user -e editor@example.com -n " Editor User" -p editorpass123 -r editor
199199
200200# Create a moderator user
201- npx nuxt-users create-user moderator@example.com " Moderator User" modpass123 moderator
201+ npx nuxt-users create-user -e moderator@example.com -n " Moderator User" -p modpass123 -r moderator
202202```
203203
204204The default role is ` user ` if not specified.
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ npx nuxt-users migrate
5454### 4. Create Your First User
5555
5656``` bash
57- npx nuxt-users create-user admin@example.com " Admin User" password123 admin
57+ npx nuxt-users create-user -e admin@example.com -n " Admin User" -p password123 -r admin
5858```
5959
6060> ⚠️ ** IMPORTANT: Permissions Required for Protected Routes**
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ npx nuxt-users create-personal-access-tokens-table
9898npx nuxt-users create-password-reset-tokens-table
9999
100100# Create your first user
101- npx nuxt-users create-user user@example.com " John Doe" password123
101+ npx nuxt-users create-user -e user@example.com -n " John Doe" -p password123
102102```
103103
104104## Next Steps
Original file line number Diff line number Diff line change @@ -158,17 +158,17 @@ sqlite3 data/users.sqlite3 ".schema users"
158158npx nuxt-users list-users
159159
160160# Or create a test user
161- npx nuxt-users create-user test@example.com " Test User" password123
161+ npx nuxt-users create-user -e test@example.com -n " Test User" -p password123
162162```
163163
1641642 . ** Verify password hashing:**
165165``` bash
166166# Passwords are automatically hashed - don't hash them manually
167167# ❌ Wrong:
168- npx nuxt-users create-user user@example.com " User" $( echo -n " password" | bcrypt)
168+ npx nuxt-users create-user -e user@example.com -n " User" -p $( echo -n " password" | bcrypt)
169169
170170# ✅ Correct:
171- npx nuxt-users create-user user@example.com " User" password123
171+ npx nuxt-users create-user -e user@example.com -n " User" -p password123
172172```
173173
1741743 . ** Check database connection:**
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33# Configuration
4- SERVER_HOST=" 35.198.93.8 "
4+ SERVER_HOST=" 34.159.83.210 "
55SERVER_USER=" sravanam"
66REMOTE_DOCS_PATH=" /var/www/nuxt-users.webmania.cc"
77LOCAL_BUILD_PATH=" docs/.vitepress/dist"
You can’t perform that action at this time.
0 commit comments