Make API port configurable and add documentation

This commit is contained in:
Tim Weber 2019-04-03 18:28:50 +02:00
parent cdde4db66c
commit bb4bebaee6
2 changed files with 11 additions and 1 deletions

View File

@ -10,6 +10,14 @@ npm install
npm run serve
```
Change the port Vue binds to via the `--port` parameter.
Use the `VUE_APP_API_PORT` environment variable to point Vue to the JHipster API port.
For example, to specify both settings:
```
VUE_APP_API_PORT=45678 npm run serve -- --port=2345
```
### Compiles and minifies for production
```
npm run build

View File

@ -5,7 +5,9 @@ import HSAdmin from "./hsadmin.js"
Vue.use(Router);
const hsa = new HSAdmin();
const hsa = new HSAdmin({
baseURL: `http://localhost:${process.env.VUE_APP_API_PORT || 8080}/api`,
});
const routeProps = (route) => {
return Object.assign({}, route.params,{
hsadmin: hsa