A fullstack demo used Vue2 & Koa2(Koa1 version is here)
View the article for more details.
If you want to check the info of the test, view the article for more details.
git clone https://github.com/Molunerfinn/vue-koa-demo.git
npm install
or yarn
if you are using yarn & meet this error:
error upath@1.0.4: 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
Node.js & Docker support. You need to create a
.env
file as above.
Beacuse of using Koa2, Node.js >= v7.6.0
is needed.
npm run dev
&& npm run server
open browser: localhost:8080
tips: login password is 123
npm run start
open browser: localhost:8889
tips: login password is 123
npm run test
and find the coverage report in the coverage/lcov/index.html
docker-compose build
&& docker-compose up
mysql in docker use 3306 port inside & outside.
open browser: localhost:8889
tips: login password is 123
Copyright (c) 2017 Molunerfinn
Vue-cnodejs - 基于vue重写Cnodejs.org的webapp NeteaseCloudWebApp - 高仿网易云音乐的webapp vue-zhihu-daily - 知乎日报 with Vuejs vue-wechat - vue.js开发微信app界面 vue2-demo - 从零构建vue2 + vue-router + vuex 开发环境 eleme - 高仿饿了么ap
Vue-cnodejs - 基于vue重写Cnodejs.org的webapp NeteaseCloudWebApp - 高仿网易云音乐的webapp vue-zhihu-daily - 知乎日报 with Vuejs vue-wechat - vue.js开发微信app界面 vue2-demo - 从零构建vue2 + vue-router + vuex 开发环境 eleme - 高仿饿了么ap
一. 什么是前后端联调 1.在我们开发的过程中,发送请求的ajax数据都不是后端返回的真数据,而是我们自己通过接口mock模拟的假数据,当前端的代码编写完成后,后端的接口也写好后,我们就需要把mock数据换点,尝试使用后端提供的数据,进行一个前后端的调试,我们会把这个过程叫做前后端接口联调。 2.前后端联调是一种真实业务数据和本地mock数据之间来回切换以达到前后端分离架构下的不同开发速度时数据交
Koa Vue Fullstack Boilerplate �� �� �� Upgrade Webpack to v5! Project based on Webpack4 is in Releases. Preface Vue.js, Koa.js, Node.js, and MongoDB fullstack lightweight example application. Authenti
内容 Vue,React,微信小程序,快应用,TS , Koa和JS 一把梭。 star ^_^欢迎star,你的star是我更新的动力^_^ 目录 mini-program-demo:小程序 demomini-program-template:小程序 templatereact-koa:react+koa 的全栈demoreact-mobile:react 的移动端 demodva-umi-te
Koa-Vue-Notes-Api This is a simple SPA built using Koa as the backend, Vue as the first frontend, and React as the second frontend. Frontend Vue GitHub Frontend Vue Demo Frontend React GitHub Fron
Koa Vue SSR Template This template built with Vue 2.x, vue-router & vuex with server-side rendering by koa. Screenshot Build Setup Requires Node.js 7+ # install dependenciesnpm install # or yarn insta
Koa art-template view render middleware. support all feature of art-template. Install npm install --save art-template npm install --save koa-art-template Example const Koa = require('koa'); const ren
koa是Express的下一代基于Node.js的web框架,目前有1.x和2.0两个版本。 历史 1. Express Express是第一代最流行的web框架,它对Node.js的http进行了封装,用起来如下: var express = require('express'); var app = express(); app.get('/', function (req, res) {