kv2 = koa 2.x + vue 2.x server side rendering
A Vue.js project with vue 2.0, vue-router and vuex starter kit for server side rendering.
Build Setup
Node.js 4.x+
npm install
npm run build
npm start
Development Setup
npm install
npm run dev
koa 2.x + vue 2.x server side rendering
Home Page: https://github.com/i5ting/koa2vue2ssr
A Vue.js project with vue 2.0, vue-router and vuex starter kit for server side rendering.
Node.js 4.x+
npm install
npm run build
npm start
npm install
npm run dev
router.get('/dist', serve(resolve('./dist')));
这行代码在我这无效呢? 求解
After build && start, I got it:
server started at http://localhost:3000
data pre-fetch: 36ms
events.js:160
throw er; // Unhandled 'error' event
^Error: write after end
at ServerResponse.write (_http_outgoing.js:443:15)
at Object.ctx.write (C:\github\vuekoassr\koa2vue2ssr\node_modules\koa-bigpipe\index.js:31:9)
at PassThrough.renderStream.on.chunk (C:\github\vuekoassr\koa2vue2ssr\server.js:75:13)
at emitOne (events.js:96:13)
at PassThrough.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at PassThrough.Readable.push (_stream_readable.js:134:10)
at PassThrough.Transform.push (_stream_transform.js:128:32)
at afterTransform (_stream_transform.js:77:12)
at TransformState.afterTransform (_stream_transform.js:54:12)npm ERR! Windows_NT 10.0.15014
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start:cross-env NODE_ENV=production node server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'cross-env NODE_ENV=production node server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the koavue2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production node server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs koavue2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls koavue2
npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:
npm ERR! C:\github\vuekoassr\koa2vue2ssr\npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.