File tree Expand file tree Collapse file tree 5 files changed +9389
-41
lines changed Expand file tree Collapse file tree 5 files changed +9389
-41
lines changed Original file line number Diff line number Diff line change @@ -14,56 +14,39 @@ This starter lets you get started with [NuxtHub](https://hub.nuxt.com) in second
14
14
15
15
## Setup
16
16
17
- Make sure to install the dependencies:
17
+ Make sure to install the dependencies with [ pnpm ] ( https://pnpm.io ) .
18
18
19
19
``` bash
20
- # npm
21
- npm install
22
-
23
- # pnpm
24
20
pnpm install
25
-
26
- # yarn
27
- yarn install
28
-
29
- # bun
30
- bun install
31
21
```
32
22
33
23
## Development Server
34
24
35
25
Start the development server on ` http://localhost:3000 ` :
36
26
37
27
``` bash
38
- # npm
39
- npm run dev
40
-
41
- # pnpm
42
- pnpm run dev
43
-
44
- # yarn
45
- yarn dev
46
-
47
- # bun
48
- bun run dev
28
+ pnpm dev
49
29
```
50
30
51
31
## Production
52
32
53
33
Build the application for production:
54
34
55
35
``` bash
56
- # npm
57
- npm run build
36
+ pnpm build
37
+ ```
58
38
59
- # pnpm
60
- pnpm run build
39
+ Check out the [ deployment documentation] ( https://hub.nuxt.com/docs/getting-started/deploy ) for more information.
40
+
41
+ ## Deploy
61
42
62
- # yarn
63
- yarn build
43
+ Deploy the application on the Edge with [ NuxtHub] ( https://hub.nuxt.com ) on your Cloudflare account:
64
44
65
- # bun
66
- bun run build
45
+ ``` bash
46
+ npx nuxthub deploy
67
47
```
68
48
69
- Check out the [ deployment documentation] ( https://hub.nuxt.com/docs/getting-started/deploy ) for more information.
49
+ Then checkout your server logs, analaytics and more in the [ NuxtHub Admin] ( https://admin.hub.nuxt.com ) .
50
+
51
+ You can also deploy using [ Cloudflare Pages CI] ( https://hub.nuxt.com/docs/getting-started/deploy#cloudflare-pages-ci ) .
52
+
Original file line number Diff line number Diff line change 2
2
const { data : redirects, refresh } = await useFetch (' /api/redirects' , {
3
3
transform : (data : { [key : string ]: string }) => {
4
4
// Transform to text for the textarea
5
- return Object .entries (data ).map (([from , to ]) => ` ${from } ${to } ` ).join (' \n ' )
5
+ return { text: Object .entries (data ).map (([from , to ]) => ` ${from } ${to } ` ).join (' \n ' ) }
6
6
}
7
7
})
8
8
9
9
async function updateRedirects () {
10
10
const body = Object .fromEntries (
11
- redirects .value ! .split (' \n ' ).map (line => line .split (' ' ))
11
+ redirects .value ! .text . split (' \n ' ).map (line => line .split (' ' ))
12
12
)
13
13
await $fetch (' /api/redirects' , {
14
14
method: ' PUT' ,
@@ -22,7 +22,7 @@ async function updateRedirects () {
22
22
<div >
23
23
<h3 >Server redirects</h3 >
24
24
<form @submit.prevent =" updateRedirects" >
25
- <p ><textarea v-model =" redirects" rows =" 6" placeholder =" /from /to (one redirect per line)" style =" width : 300px ;" /></p >
25
+ <p ><textarea v-model =" redirects.text " rows =" 6" placeholder =" /from /to (one redirect per line)" style =" width : 300px ;" /></p >
26
26
<button type =" submit" >
27
27
Save redirects
28
28
</button >
Original file line number Diff line number Diff line change 13
13
},
14
14
"dependencies" : {
15
15
"@nuxt/eslint" : " ^0.3.13" ,
16
- "@nuxthub/core" : " ^0.6.11 " ,
17
- "nuxt" : " ^3.12.1 "
16
+ "@nuxthub/core" : " ^0.7.0 " ,
17
+ "nuxt" : " ^3.12.2 "
18
18
},
19
19
"devDependencies" : {
20
20
"@nuxt/eslint-config" : " ^0.3.13" ,
21
- "eslint" : " ^9.4 .0" ,
22
- "vue-tsc" : " ^2.0.21 " ,
23
- "wrangler" : " ^3.60.1 "
21
+ "eslint" : " ^9.5 .0" ,
22
+ "vue-tsc" : " ^2.0.22 " ,
23
+ "wrangler" : " ^3.62.0 "
24
24
}
25
25
}
You can’t perform that action at this time.
0 commit comments