Overview
The ServITech Backend API base URL varies depending on the environment where the application is deployed. All API endpoints should be prefixed with the base URL and/api path.
Environment Configuration
The base URL is configured in the.env file using the APP_URL variable.
Local Development
For local development, the default configuration is:Production
For production environments, update theAPP_URL to your production domain:
Making Requests
All API requests should be made to the base URL followed by the specific endpoint path.Environment Variables
The following environment variables affect the API configuration:| Variable | Description | Default Value |
|---|---|---|
APP_NAME | Application name | ServITech |
APP_VERSION | Application version | 1.0.0 |
APP_ENV | Environment (local, production) | local |
APP_URL | Base application URL | http://localhost:8000 |
APP_LOCALE | Default language | es |
APP_FALLBACK_LOCALE | Fallback language | en |
APP_DEBUG | Debug mode (true/false) | true |
API Documentation URL
The API also exposes automatically generated documentation via Scramble:SCRAMBLE_API_ROUTE environment variable.
CORS Configuration
When making requests from a web browser, ensure that CORS (Cross-Origin Resource Sharing) is properly configured on the server to allow requests from your frontend domain.In development, you may need to configure CORS to allow requests from
http://localhost:3000 or your frontend development server.