Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 1.41 KB

README.md

File metadata and controls

77 lines (45 loc) · 1.41 KB

nodejs_koa2_vue2_mysql

A fullstack demo used Vue2 & Koa2(nodejs_koa2_vue2_mysql)

☀️ Easy to setup and learn

💯 Api test coverage

🚀 Instant feedback

Todolist

Install(安装相关)

git clone

npm install

mysql config

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(运行)

Node.js 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

License(协议)

MIT

Copyright (c) 2018 Jerry