Laravel Forge JavaScript SDK
Configuration Files
Configuration Files
Get Nginx configuration
Method
forge.config.getNginx(server_id, site_id)
Usage
1const forge = new Forge('API_TOKEN');23const nginxConfig = await forge.config.getNginx(server_id, site_id);
Example Response
The response is a string for this request.
Update Nginx configuration
Method
forge.config.updateNginx(server_id, site_id, payload)
Usage
1const forge = new Forge('API_TOKEN');23const updatedConfig = await forge.config.updateNginx(4 server_id,5 site_id,6 payload,7);
Payload
1{2 content: 'CONTENT';3}
Get .env file
Method
forge.config.getEnv(server_id, site_id)
Usage
1const forge = new Forge('API_TOKEN');23const envFile = await forge.config.getEnv(server_id, site_id);
Example Response
The response is a string for this request.
Update .env file
Method
forge.config.updateEnv(server_id, site_id, payload)
Usage
1const forge = new Forge('API_TOKEN');23const updatedEnv = await forge.config.updateEnv(server_id, site_id, payload);
Payload
1{2 content: 'CONTENT';3}
Edit this page on GitHub