Settings File

For each entity we create a file called settings.js to group basic properties of its domain

path

This property will indicate which will be the base route that will be used in the routes that will be created to access the screens of this domain.

domain

It is a string with the path from the domains/ folder usingkabeb-case for the folder names and period (.) As the level separator. For an entity insrc/domain/Sale/Order we will havesale.order. For compound names likeSale/OrderItem we will havesale.order-item, replacing the capital letter in the middle with hyphen (-) followed by the same letter that was capitalized by its lowercase version.

resource

Theresourceis the base endpoint of the entity in theAPI RESTful that will be consumed. It can be something like/posts orblog/posts and it will be the final part of the URL that will be used to compose the requests that will be made to manage the resources. If the API is mounted on top of http://localhost:8000 (in.env files this will be the value of the variableVUE_APP_REST_BASE_URL) the final URL will behttp://localhost:8000/posts orhttp://localhost:8000/blog/posts, according to the examples mentioned above. On top of this URL, the verbsGET, POST, PUT, PATCH and DELETE will be applied.

Last updated

Was this helpful?