Skip to content

Make intro more newbie-friendly #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
realtebo authored Apr 19, 2019
commit aebae90a9ae6ee1e9455de09788dd914b8c10e75
17 changes: 17 additions & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ It is pretty straightforward when used inside a Node.js server, for example [Exp
npm install express --save
```
---

Save the following code in a `.js` file, for example `render2.js`

``` js
const Vue = require('vue')
const server = require('express')()
Expand Down Expand Up @@ -96,6 +99,20 @@ server.get('*', (req, res) => {
server.listen(8080)
```

To run the code, from the prompt console of your OS execute

``` bash
node .\render2.js
```

Then open your browser at [http://localhost:8080

You should see no output in the console, but you'll see what follows in your browser

```
The visited URL is: /
```

## Using a Page Template

When you render a Vue app, the renderer only generates the markup of the app. In the example we had to wrap the output with an extra HTML page shell.
Expand Down