This is the Dashboard frontend for Amoro Management Service (AMS).
- node >=
18.18.0
- pnpm
In the amoro-web
directory, run pnpm install
to install all the dependencies.
After completing the [Installing Dependencies](#Installing Dependencies) step, you're ready to start the project!
If You are a frontend developer
In the amoro-web
directory, run pnpm dev:mock
to start a development server for the dashboard app at http://127.0.0.1:8080
.
If You not. You just running pnpm dev
-
open the
vite.config.ts
under the folderamoro-web
-
find the
proxy
configuration then unpack annotations and change thetarget
to you server location
proxy: {
'^/ams': {
// change the target to your backend server
// Such as target: 'http://127.0.0.1:xxx',
target: 'http://127.0.0.1:8080',
changeOrigin: true,
configure(_, options) {
// configure proxy header here
options.headers = {
'cookie': 'JSESSIONID=node07rhpm05aujgi1amdr8stpj9xa4.node0',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Headers':
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild',
'Access-Control-Allow-Methods': 'PUT,POST,GET,DELETE,OPTIONS'
}
}
}
}
In the amoro-web
directory, run pnpm build
to prepare the dashboard for deployment.
amoro-web
|-- mock
|-- public
|-- src
|-- components
|-- hooks
|-- store
|-- services
|-- utils
|-- views
|-- main.tx
|-- App.vue
|-- vue.config.js
|-- package.json
|-- pnpm-lock
- public: The index.html and favicon.ico of this project.
- src: The source files of this project.
- src/components: All the shared components in the repo, can be used in all views.
- src/views: All the views.
- src/services: The services for the feature component to communicate with ams server.
- src/utils: The utility functions in this project.
- src/App.vue: The entrance of this project.
- vite.config.ts: The configuration file of vue3.
- package.json: The project build files and package management, it defines the scripts/tasks and the dependent packages for this project.
- pnpm-lock.yaml: The package management pnpm lock file.