Molunerfinn/vue-koa-demo
关于
使用 Vue 2 和 Koa 2 编写的简单全栈示例,支持 CSR、SSR 和 Docker。Koa 1 版本也已完成。
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文vue-koa-demo
A fullstack demo used Vue2 & Koa2(Koa1 version is here)
:sunny: Easy to setup and learn
:100: Api test coverage
:rocket: Instant feedback
:stuck_out_tongue_winking_eye: Vue SSR support in the ssr branch
:tada: Docker support

View the article for more details.
If you want to check the info of the test, view the article for more details.
Install
git clone https://github.com/Molunerfinn/vue-koa-demo.git
npm install or yarn
if you are using yarn & meet this error:
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=4 <=9".
please use
yarn --ignore-engines
Also you need to install MySQL & create a database named todolist,and execute 2 sql files list.sql & user.sql.They are in sql/
After that, create a .env file and set the database username & password:
# your database username
DB_USER=XXXX
# your database
DB_PASSWORD=YYYY
# Koa is listening to this port
PORT=8889
If you want to run the test for the Project, please create a .env.test file to face this situation:
# your database username
DB_USER=XXXX
# your database
DB_PASSWORD=YYYY
# The port which is listened by koa in the test environment
PORT=8888
Run
Node.js & Docker support. You need to create a
.envfile as above.
Node.js
Beacuse of using Koa2, Node.js >= v7.6.0 is needed.
Development:
npm run dev && npm run server
open browser: localhost:8080
tips: login password is 123
Production:
npm run start
open browser: localhost:8889
tips: login password is 123
Test:
npm run test and find the coverage report in the coverage/lcov/index.html
Docker
docker-compose build && docker-compose up
mysql in docker use 3306 port inside & outside.
open browser: localhost:8889
tips: login password is 123
License
Copyright (c) 2017 Molunerfinn
探索相关项目
加载中…