03 build - dptole/aws-vue-koa GitHub Wiki
To build this project you need to run the steps below:
$ git clone https://github.com/dptole/aws-vue-koa/
$ cd aws-vue-koa/
$ ls frontend/src # YOUR FRONTEND SOURCE FILES
components css fonts images index.html js manifest.json service-worker.js
$ npm i # INSTALL THE DEPENDENCIES
... It takes some time ...
$ npm run gulp-watch-prod # CREATE THE FRONTEND BUILD
> [email protected] gulp-watch-prod aws-vue-koa
> gulp watch-prod
[20:59:20] Using gulpfile aws-vue-koa/gulpfile.js
[20:59:20] Starting 'watch-prod'...
[20:59:20] Starting 'prod'...
[20:59:20] Starting 'del'...
[20:59:20] Finished 'del' after 17 ms
[20:59:20] Starting 'copy'...
[20:59:21] Finished 'copy' after 44 ms
[20:59:21] Starting 'preprocess-vue'...
[20:59:21] Finished 'preprocess-vue' after 36 ms
[20:59:21] Starting 'preprocess-prod'...
[20:59:21] Finished 'preprocess-prod' after 139 ms
[20:59:21] Starting 'html'...
[20:59:21] Finished 'html' after 69 ms
[20:59:21] Starting 'css'...
[20:59:21] Finished 'css' after 482 ms
[20:59:21] Starting 'js'...
[20:59:22] Finished 'js' after 366 ms
[20:59:22] Starting 'vue'...
[20:59:26] Finished 'vue' after 4.4 s
[20:59:26] Starting 'clean-up'...
[20:59:26] Finished 'clean-up' after 5.21 ms
[20:59:26] Finished 'prod' after 5.56 s
This command will generate the build files for the frontend, if you stop it you will not be able to see the changes in the project after having updated the code.
Open a new terminal:
$ node app.js
Running on port: 9999
You can change the port by editing the package.json
file.
Now the server is running and updates to the frontend/src files will automatically generate a new build for you.