|
1 | | -# Koa Vue Fullstack Boilerplate |
2 | | -##### 🎉🎉🎉 Upgrade Webpack to v4! |
3 | | -<sup> Project based on Webpack3 is in [Releases](https://github.com/yunhan0/koa-vue-fullstack/releases). </sup> |
4 | | - |
5 | | -### Preface |
6 | | -##### Vue.js, Koa.js, Node.js, and MongoDB fullstack lightweight example application. Authentication, CRUD, and access control included. |
7 | | -This project aims to build a small but structured full-stack application, so it would be relatively clear for a programmer/beginner to understand how to build a website from scratch. |
8 | | - |
9 | | -### Demo: |
10 | | -Click [here](http://yunhan.li/koa-vue-fullstack) to see demo website. Server is deployed on heroku's free plan :) 🐢🐢🐢.<br> |
11 | | -<pre> |
12 | | - |
13 | | -password: 123456 |
14 | | -</pre> |
15 | | - |
16 | | -### Environment: |
17 | | -- Server |
18 | | - - [Koa](http://koajs.com/) |
19 | | - - Koa Router, Koa Cors, Koa Bodyparser |
20 | | - - Mongoose |
21 | | - - Node ~~v8.9.4~~ v10.12.0 |
22 | | -- Client |
23 | | - - [Vue](https://vuejs.org/) |
24 | | - - [iView](https://www.iviewui.com/) |
25 | | - - [Axios](https://github.com/axios/axios) (HTTP Client Library) |
26 | | - - ~~Webpack 3~~ Webpack 4 |
27 | | - - WebpackDevServer (Development mode only) |
28 | | - |
29 | | -### Architecture |
30 | | - |
31 | | - ├─client # frontend folder |
32 | | - │ ├─src # frontend src |
33 | | - │ │ ├─api |
34 | | - │ │ ├─router |
35 | | - │ │ ├─styles |
36 | | - │ │ ├─components |
37 | | - │ │ ├─store # state management |
38 | | - │ │ │ └─modules |
39 | | - │ │ └─view # app pages |
40 | | - │ │ └─auth |
41 | | - │ └─static # static folder |
42 | | - | |
43 | | - └─server # server folder |
44 | | - └─src # server src |
45 | | - ├─api # server api list |
46 | | - │ ├─auth # completely token-based authentication |
47 | | - │ ├─thing |
48 | | - │ └─user |
49 | | - ├─config # server configurations |
50 | | - │ ├─index # default server port, mongo uri, etc settings |
51 | | - │ ├─security # security settins |
52 | | - │ └─seed # populate database with sample data on server start |
53 | | - ├─entry.js # entry file for environment setup |
54 | | - ├─main.js # main file after entry |
55 | | - └─routes.js # router |
56 | | - |
57 | | -### Run through Docker |
58 | | -```bash |
59 | | - cd server # You can boost the server by using Docker |
60 | | - docker-compose up |
61 | | - # Open a new tab |
62 | | - cd client |
63 | | - npm install |
64 | | - npm start |
65 | | -``` |
66 | | - |
67 | | -### Setup Locally: |
68 | | -- Steps: |
69 | | -The server and client are completely seperated in this project, so go to each client and server folder and run: |
70 | | - |
71 | | -```bash |
72 | | - cd client |
73 | | - npm install |
74 | | - npm start # Running dev client |
75 | | - # Open a new tab |
76 | | - mongod # Boost Mongo DB |
77 | | - # Open a new tab |
78 | | - cd server |
79 | | - # CREATE a .env file under server folder, and copy and paste the contents of .env.default file into this .env, and assign values |
80 | | - touch .env |
81 | | - npm install |
82 | | - npm start # Running dev server |
83 | | -``` |
84 | | - |
85 | | -- Others: |
86 | | -```bash |
87 | | -npm run build # Running production mode |
88 | | -npm run eslint # Check your coding style |
89 | | -npm run eslint-fix # Use auto ESLint fix |
90 | | -``` |
| 1 | +# Koa Vue Fullstack Boilerplate |
| 2 | +##### 🎉🎉🎉 Upgrade Webpack to v4! |
| 3 | +<sup> Project based on Webpack3 is in [Releases](https://github.com/yunhan0/koa-vue-fullstack/releases). </sup> |
| 4 | + |
| 5 | +### Preface |
| 6 | +##### Vue.js, Koa.js, Node.js, and MongoDB fullstack lightweight example application. Authentication, CRUD, and access control included. |
| 7 | +This project aims to build a small but structured full-stack application, so it would be relatively clear for a programmer/beginner to understand how to build a website from scratch. |
| 8 | + |
| 9 | +### Demo: |
| 10 | +Click [here](http://yunhan.li/koa-vue-fullstack) to see demo website.<br> |
| 11 | +<pre> |
| 12 | + |
| 13 | +password: 123456 |
| 14 | +</pre> |
| 15 | + |
| 16 | +### Environment: |
| 17 | +- Server |
| 18 | + - [Koa](http://koajs.com/) |
| 19 | + - Koa Router, Koa Cors, Koa Bodyparser |
| 20 | + - Mongoose |
| 21 | + - Node ~~v8.9.4~~ v10.12.0 |
| 22 | +- Client |
| 23 | + - [Vue](https://vuejs.org/) |
| 24 | + - [iView](https://www.iviewui.com/) |
| 25 | + - [Axios](https://github.com/axios/axios) (HTTP Client Library) |
| 26 | + - ~~Webpack 3~~ Webpack 4 |
| 27 | + - WebpackDevServer (Development mode only) |
| 28 | + |
| 29 | +### Architecture |
| 30 | + |
| 31 | + ├─client # frontend folder |
| 32 | + │ ├─src # frontend src |
| 33 | + │ │ ├─api |
| 34 | + │ │ ├─router |
| 35 | + │ │ ├─styles |
| 36 | + │ │ ├─components |
| 37 | + │ │ ├─store # state management |
| 38 | + │ │ │ └─modules |
| 39 | + │ │ └─view # app pages |
| 40 | + │ │ └─auth |
| 41 | + │ └─static # static folder |
| 42 | + | |
| 43 | + └─server # server folder |
| 44 | + └─src # server src |
| 45 | + ├─api # server api list |
| 46 | + │ ├─auth # completely token-based authentication |
| 47 | + │ ├─thing |
| 48 | + │ └─user |
| 49 | + ├─config # server configurations |
| 50 | + │ ├─index # default server port, mongo uri, etc settings |
| 51 | + │ ├─security # security settins |
| 52 | + │ └─seed # populate database with sample data on server start |
| 53 | + ├─entry.js # entry file for environment setup |
| 54 | + ├─main.js # main file after entry |
| 55 | + └─routes.js # router |
| 56 | + |
| 57 | +### Run through Docker |
| 58 | +```bash |
| 59 | + cd server # You can boost the server by using Docker |
| 60 | + docker-compose up |
| 61 | + # Open a new tab |
| 62 | + cd client |
| 63 | + npm install |
| 64 | + npm start |
| 65 | +``` |
| 66 | + |
| 67 | +### Setup Locally: |
| 68 | +- Steps: |
| 69 | +The server and client are completely seperated in this project, so go to each client and server folder and run: |
| 70 | + |
| 71 | +```bash |
| 72 | + cd client |
| 73 | + npm install |
| 74 | + npm start # Running dev client |
| 75 | + # Open a new tab |
| 76 | + mongod # Boost Mongo DB |
| 77 | + # Open a new tab |
| 78 | + cd server |
| 79 | + # CREATE a .env file under server folder, and copy and paste the contents of .env.default file into this .env, and assign values |
| 80 | + touch .env |
| 81 | + npm install |
| 82 | + npm start # Running dev server |
| 83 | +``` |
| 84 | + |
| 85 | +- Others: |
| 86 | +```bash |
| 87 | +npm run build # Running production mode |
| 88 | +npm run eslint # Check your coding style |
| 89 | +npm run eslint-fix # Use auto ESLint fix |
| 90 | +``` |
0 commit comments