Skip to content

Commit ce92204

Browse files
author
pooya parsa
committed
chore: sync readme
1 parent 0f27f80 commit ce92204

File tree

1 file changed

+27
-105
lines changed

1 file changed

+27
-105
lines changed

distributions/nuxt/README.md

Lines changed: 27 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,31 @@
4646

4747
Learn more at <https://nuxtjs.org>.
4848

49+
## Getting started
50+
51+
```sh
52+
$ npx create-nuxt-app <project-name>
53+
```
54+
55+
It's as simple as that!
56+
57+
Learn more at https://nuxtjs.org/guide/installation
58+
59+
## Examples
60+
61+
Please take a look at <https://nuxtjs.org/examples> or directly in <https://github.com/nuxt/nuxt.js/tree/dev/examples>.
62+
63+
## Production deployment
64+
65+
To deploy, instead of running nuxt, you probably want to build ahead of time. Therefore, building and starting are separate commands:
66+
67+
```bash
68+
nuxt build
69+
nuxt start
70+
```
71+
72+
Learn more at https://nuxtjs.org/guide/commands#production-deployment
73+
4974
## Consulting from the Nuxt team
5075

5176
Get help with that tough bug or make sure your Nuxt app is ready to deploy. For $250 an hour, get technical support, advice, code reviews, and development from the Nuxt core team: [Hire Nuxt on Otechie](https://otechie.com/nuxt?ref=readme)
@@ -85,111 +110,6 @@ Support us with a monthly donation and help us continue our activities. [[Become
85110

86111
[![Open Collective Nuxters][nuxters-src]][nuxters-href]
87112

88-
## Getting started
89-
90-
```sh
91-
$ npx create-nuxt-app <project-name>
92-
```
93-
94-
It's as simple as that!
95-
96-
## Templates
97-
98-
:point_right: We recommend to start directly with our cli [create-nuxt-app](https://github.com/nuxt-community/create-nuxt-app) for the latest updates.
99-
100-
Or you can start by using one of our starter templates:
101-
102-
- [express](https://github.com/nuxt-community/express-template): Nuxt.js + Express
103-
- [koa](https://github.com/nuxt-community/koa-template): Nuxt.js + Koa
104-
- [adonuxt](https://github.com/nuxt-community/adonuxt-template): Nuxt.js + AdonisJS
105-
- [micro](https://github.com/nuxt-community/micro-template): Nuxt.js + Micro
106-
- [nuxtent](https://github.com/nuxt-community/nuxtent-template): Nuxt.js + Nuxtent module for content heavy sites
107-
108-
## Using nuxt.js programmatically
109-
110-
```js
111-
const { Nuxt, Builder } = require('nuxt')
112-
113-
// Import and set nuxt.js options
114-
const config = require('./nuxt.config.js')
115-
config.dev = (process.env.NODE_ENV !== 'production')
116-
117-
const nuxt = new Nuxt(config)
118-
119-
// Start build process (only in development)
120-
if (config.dev) {
121-
new Builder(nuxt).build()
122-
}
123-
124-
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
125-
```
126-
127-
Learn more: <https://nuxtjs.org/api/nuxt>
128-
129-
## Using nuxt.js as a middleware
130-
131-
You might want to use your own server with your configurations, your API and everything awesome you have created with. That's why you can use nuxt.js as a middleware. It's recommended to use it at the end of your middleware since it will handle the rendering of your web application and won't call next().
132-
133-
```js
134-
app.use(nuxt.render)
135-
```
136-
137-
Learn more: <https://nuxtjs.org/api/nuxt-render>
138-
139-
## Render a specific route
140-
141-
This is mostly used for `nuxt generate` and test purposes but you might find another utility!
142-
143-
```js
144-
nuxt.renderRoute('/about', context)
145-
.then(function ({ html, error }) {
146-
// You can check error to know if your app displayed the error page for this route
147-
// Useful to set the correct status code if an error appended:
148-
if (error) {
149-
return res.status(error.statusCode || 500).send(html)
150-
}
151-
res.send(html)
152-
})
153-
.catch(function (error) {
154-
// And error appended while rendering the route
155-
})
156-
```
157-
158-
Learn more: <https://nuxtjs.org/api/nuxt-render-route>
159-
160-
## Examples
161-
162-
Please take a look at <https://nuxtjs.org/examples> or directly in <https://github.com/nuxt/nuxt.js/tree/dev/examples>.
163-
164-
## Production deployment
165-
166-
To deploy, instead of running nuxt, you probably want to build ahead of time. Therefore, building and starting are separate commands:
167-
168-
```bash
169-
nuxt build
170-
nuxt start
171-
```
172-
173-
For example, to deploy with [`now`](https://zeit.co/now) a `package.json` like follows is recommended:
174-
175-
```json
176-
{
177-
"name": "my-app",
178-
"dependencies": {
179-
"nuxt": "latest"
180-
},
181-
"scripts": {
182-
"dev": "nuxt",
183-
"build": "nuxt build",
184-
"start": "nuxt start"
185-
}
186-
}
187-
```
188-
189-
Then run `now` and enjoy!
190-
191-
Note: we recommend putting `.nuxt` in `.npmignore` or `.gitignore`.
192-
193113
## Core team
194114

195115
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
@@ -206,6 +126,8 @@ Thank you to all our [contributors](https://github.com/nuxt/nuxt.js/graphs/contr
206126

207127
## Contributing
208128

129+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/nuxt/nuxt.js)
130+
209131
Please refer to our [Contribution Guide](https://nuxtjs.org/guide/contribution-guide#codefund_ad)
210132

211133
## Cross-browser testing

0 commit comments

Comments
 (0)