Douban book website demo by server side render
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7ff71a0 May 8, 2018
Permalink
Failed to load latest commit information.
backend replace imgs folder Nov 29, 2016
build fix babel error Dec 1, 2016
frontend 更改文件目录 Nov 29, 2016
public 更改文件目录 Nov 29, 2016
.babelrc vue 2.0 Sep 12, 2016
.gitignore 更改文件目录 Nov 29, 2016
.travis.yml update travis

 Nov 26, 2016
README.md Update readme.md list May 7, 2018
config.js Update config.js Dec 27, 2016
index.html update Jan 1, 2017
package.json fix babel error Dec 1, 2016
server.js Update server.js Dec 27, 2016
yarn.lock update Jan 1, 2017

README.md

Douban Book Website

Build Status

vue.js 2.0, vuex, vue-router, vue-server-renderer, express, cheerio, superagent, redis

1. Start

# start redis

# install dependencies
npm install

# start in development
npm run dev

# init data, start spider
curl http://host:port/api/spider // replace your host:port

# build for production
npm run build

2. Notes

  1. xxx

  2. open http://127.0.0.1:4000/api/spider, start spider

  3. pages:

3. Vue.js1.0 update to Vue.js2.0

  1. "window undefined" in server side render
  2. v-html replace {{{}}}
  3. webpack error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.  trick:
$ npm uninstall webpack --save-dev

followed by

$ npm install webpack@2.1.0-beta.22 --save-dev

Then you should be able to gulp again. Fixed the issue for me.

npm run dev from: https://github.com/angular/angular-cli/issues/2234

<div>
  <span v-for="n in 10">{{ n }}</span> // n
</div>
<div>
  <span v-for="(item, $index) in items">{{ $index }}</span> // $index
</div>

4. Update

2016 12 01 fix babel error

5. Tree

.
├── README.md 
├── build
├── index.html
├── server.js
├── frontend
│   ├── App.vue
│   ├── app.js
│   ├── assets
│   ├── client-entry.js
│   ├── components
│   ├── router
│   ├── server-entry.js
│   ├── store
│   └── views
├── backend
│   ├── spiders
│   └── routers
├── node_modules
├── package.json
├── public
└── test