• Stars
    star
    760
  • Rank 59,770 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

๐ŸŽ‰ Docker support

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

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 .env file 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

MIT

Copyright (c) 2017 Molunerfinn

More Repositories

1

PicGo

๐Ÿš€A simple & beautiful tool for pictures uploading built by vue-cli-electron-builder
TypeScript
20,872
star
2

hexo-theme-melody

๐ŸŽนA simple & beautiful & fast theme for Hexo.
Stylus
1,537
star
3

node-github-profile-summary

[Temporarily unavailable]:octocat:The node version of github-profile-summary with GraphQL
JavaScript
263
star
4

markline.js

ใ€Wait for reconstructionใ€‘ใ€ฝ๏ธA simple js for painting marklines
JavaScript
83
star
5

vuepress-theme-melody

๐ŸŽนA simple & beautiful blog theme for vuepress.
CSS
34
star
6

Nodejs-ByrTopTen

A nodejs-spider that gets the needed information of top-ten in bbs.byr.cn
JavaScript
16
star
7

JSBox-Tools

A collection of JSBox tools created by me
JavaScript
10
star
8

FE-Learning

A repository of me to record FE-Learning process
TypeScript
10
star
9

github-stars-reminder

Use GitHub Action to Send Email to Me with My GitHub Top 20 Repos' Stars Per Day
JavaScript
10
star
10

2019-job-hunting

for job hunting
JavaScript
9
star
11

Molunerfinn.github.io

My blog
HTML
9
star
12

Gear-system

JavaScript gear-system
JavaScript
9
star
13

bbs-markdown

A markdown project for bbs.byr.cn
CSS
7
star
14

Nodejs-ByrBBSDaily

A project that displays the everyday top tens of the bbs.byr.cn
JavaScript
5
star
15

vue-mobile-learning-demo

CSS
5
star
16

hexo-theme-melody-doc

Doc for hexo-theme-melody
4
star
17

VSCode-RevealFileInFolder

Quickly open your file in folder by context menu
TypeScript
4
star
18

Mofinn-Wp

Mofinn-Wp ๏ผšA wordpress theme.
JavaScript
3
star
19

LeetCode

For Practice
JavaScript
3
star
20

dbmovie-spider

A spider that plays happily on the movie.douban.com
JavaScript
2
star
21

Melody.css

A mini & pure responsive css framwork inspired by Twitter Bootstrap
HTML
2
star
22

webpack-dev-compile-optimize

A plugin for optimizing webpack dev compile time
JavaScript
1
star
23

react-self-scaffolding

Just a react-self-scaffolding
TypeScript
1
star
24

test

For PicGo upload
1
star
25

fj-learning-resources

This is a learning-resources repository for Byrs of Fujian
1
star