Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

🔰A simple full stack demo(CSR & SSR & Docker Support) written by Vue2 & Koa2(Koa1 verson also completed)

License

Notifications You must be signed in to change notification settings

Molunerfinn/vue-koa-demo

Open more actions menu
 
 

Repository files navigation

vue-koa-demo

A fullstack demo used Vue2 & Koa2(Koa1 version is here)

☀️ Easy to setup and learn

💯 Api test coverage

🚀 Instant feedback

😜 Vue SSR Support in the ssr branch

Coverage Status

Todolist

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

Also you need to install MySQL & create a database named todolist,and execute 2 sql files list.sql & user.sql.Their 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

Notice: this branch is the ssr branch which is made by vue ssr. So you should find some differences with the master branch & koa1 branch to run it.

Node.js

Beacuse of using Koa2, Node.js >= v7.6.0 is needed.

Development:

npm run server

open browser: localhost:8889

tips: login password is 123

Production:

npm run build and then 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

License

MIT

Copyright (c) 2017 Molunerfinn

About

🔰A simple full stack demo(CSR & SSR & Docker Support) written by Vue2 & Koa2(Koa1 verson also completed)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.