Skip to content

Commit 21b00ae

Browse files
committed
update readme
1 parent 3dd7a6b commit 21b00ae

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ This repository is a clone from Stu Ratcliffe [Server rendering Vue.js applicati
33
Following his articile and trying to have some write up. (e.g. using latest packages in package.json)
44

55
## Install and run:
6-
if Webpack is not installed yet:
6+
if Webpack is not installed yet:
77
npm install -g webpack
88

99
dotnet restore
1010
npm install
1111
webpack
1212
dotnet run
13+
1314
## Packages used:
1415
- lodash <- similiar to numpy in Python, utilies library for manipulating array/object.
1516
- axios <- Promise based HTTP client for the browser and Node.js, think of $.ajax() if you come from jQuery world
@@ -39,24 +40,29 @@ if Webpack is not installed yet:
3940
Here we try to modify the implementation order different from the original post.
4041
We are going to add the loading indicator before implementing the Server Side Rendering.
4142
To simulate timely API call form remote server, we add the following line in HomeController.cs:
43+
4244
public JsonResult initialMessages(){
4345
//Added to simulate initial loading from remote server
4446
Thread.Sleep(2000);
4547
...
4648
}
4749

48-
1. Add nprogess in package.json dependency:
50+
1. Add nprogess in package.json dependency:
51+
4952
"dependencies": {
5053
"vue": "^2.5.8",
5154
"vuex": "^3.0.1",
5255
"vue-router": "^3.0.1",
5356
"lodash": "^4.17.4",
5457
"axios": "^0.17.1",
5558
"nprogress": "^0.2.0"
56-
}
57-
2. Add style-loader and css-loader to webpack.config:
59+
}
60+
61+
2. Add style-loader and css-loader to webpack.config:
62+
5863
{
5964
test: /\.css$/,
6065
loader: "style-loader!css-loader"
6166
}
67+
6268
3. Modify ClientApp/vuex/actions.js, add `NProgress.start()` and `NProgress.done()` before and after axios remote call.

0 commit comments

Comments
 (0)