-
Notifications
You must be signed in to change notification settings - Fork 2.9k
src backend services config
To locate your configuration file, see Configuring Puter.
Service configuration appears under the "services"
property in the
configuration file for Puter. If Puter's configuration had no other
values except for a service config with one key, it might look like
this:
{
"services": {
"my-service": {
"somekey": "some value"
}
}
}
Services have their configuration object assigned to this.config
.
class MyService extends BaseService {
async _init () {
// You can access configuration for a service like this
this.log.info('value of my key is: ' + this.config.somekey);
}
}
Services can access global configuration. This can be useful for knowing how Puter itself is configured, but using this global config object for service configuration is discouraged as it could create conflicts between services.
class MyService extends BaseService {
async _init () {
// You can access configuration for a service like this
this.log.info('Puter is hosted on: ' + this.global_config.domain);
}
}
This wiki is generated from the repository. Do not edit files the wiki.
You are reading documentation for Puter, an open-source high-level operating system.
Getting started with Puter on localhost is as simple as:
git clone https://github.com/HeyPuter/puter.git
npm install
npm run start
- Index (README.md)
- api drivers
- Group Endpoints
- Notification Endpoints
- Share Endpoints
- Type-Tagged Objects
- Comment Prefixes
- contributors vscode
- Local Email Testing
- Puter Extensions
- Repository Structure and Tooling
- Configuring Domains for Self-Hosted Puter
- Configuring Puter
- First Run Issues
- self_hosters config_values
- self_hosters support
- Self-Hosting Puter
- Backend Style
- Puter Backend - Directory Structure
- Puter Backend Boot Sequence
- Puter Kernel Moduels and Services
- Batch and Symlinks
- Metered Services and Cost Management
- Protected Apps and Subdomains
- Service Scripts
- Index (README.md)
- Configuring AI Services
- PuterAI API Request Examples
- src backend src modules puterai config
####### For Contributors