This sample project uses Vue.js and Vue Material. It provides only Web UI. So, I recommend using the golang-webapp-sample project as Back End Application.
Perform the following steps:
- Download and install Node.js.
- Download and install Visual Studio Code(VS Code).
- Install vetur extension for VS Code.
- Clone this repository.
- Download and install npm packages.
npm install
Perform the following steps:
- Perform golang-webapp-sample project.
- Start the development server.
npm run serve
- When startup is complete, the console shows the following message:
DONE Compiled successfully in *****ms App running at: - Local: http://localhost:3000/ - Network: http://192.168.***.***:3000/ Note that the development build is not optimized. To create a production build, run npm run build.
- Access the follwing URL in the Chrome.
http://localhost:3000
Perform the following command:
npm run build
The following figure is the map of this sample project.
- vuejs-webapp-sample
+ public … Contains resouces of this project.
- src
+ assets … Contains source codes that Webpack doesn't need to build.
+ components … Contains components of Vue.
+ ajax … Implement the common library for Ajax.
+ router … Define Vue Router.
+ store … Define Vuex
+ views … Define views of this project.
- App.vue … Define a base view of this project.
- main.js … Entry point.
- babel.config … Babel Configuration.
- package.json … Define npm packages.
- vue.config.js … Vue CLI Configuration.
There are the following views in this sample.
View Name | File Name | Description |
---|---|---|
Login View | Login.vue |
The view for session authentication with username and password. This view is created and based on the example of vue-material. |
Home View | Home.vue |
The view showing search results. |
About View | About.vue |
The view showing this application information. |
This sample uses the following library.
Library Name | Version | Description |
---|---|---|
vue-cli | 4.5.9 | The tool for Vue.js Development. |
Vue.js | 2.6.12 | JavaScript Framework |
Vue Router | 3.4.9 | Library for Routing. |
Vuex | 3.6.0 | Flux library for Vue.js |
superagent | 6.1.0 | library for Ajax. |
vue-material | 1.0.0-beta-14 | CSS Framework |
Please read CONTRIBUTING.md for proposing new functions, reporting bugs and submitting pull requests before contributing to this repository.
The License of this sample is MIT License.