|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Configuration |
| 4 | +permalink: /configuration/ |
| 5 | +nav_order: 5 |
| 6 | +--- |
| 7 | +# Configuration |
| 8 | + |
| 9 | +The settings that define an InterSystems IRIS server and the connection to the server are crucial to the functioning of VS Code in developing in ObjectScript. |
| 10 | + |
| 11 | +## Configuring a Server |
| 12 | + |
| 13 | +First, configure one or more servers. Open the settings editor by selecting **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **User** or **Workspace** settings level by selecting it at the top of the settings window. For example, the following screen shot shows Workspace selected: |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +Find Extensions in the list in the left pane of the editor window, click to open, then select InterSystems Server Manager from the list to find the correct place in the settings UI. The following screen shot shows InterSystems Server Manager selected: |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +And this screen shot shows Server Manager area of the edit pane: |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +You need to edit the server configuration in the settings.json file, so your only option is to click *Edit in settings.json*. |
| 26 | + |
| 27 | +To configure a server, enter code something like this: |
| 28 | + |
| 29 | +```js |
| 30 | +"intersystems.servers": { |
| 31 | + "test": { |
| 32 | + "webServer": { |
| 33 | + "scheme": "http", |
| 34 | + "host": "localhost", |
| 35 | + "port": 52774, |
| 36 | + }, |
| 37 | + "username": "_SYSTEM", |
| 38 | + }, |
| 39 | +}, |
| 40 | +``` |
| 41 | + |
| 42 | +The components of this server definition are: |
| 43 | + |
| 44 | +- **test** - an arbitrary name to identify this server |
| 45 | +- **webServer** - The collection of properties that define the web server. |
| 46 | +- **scheme** - The protocol used for connections. |
| 47 | +- **host** - the host for this server |
| 48 | +- **port** - the WebServer port number for this server |
| 49 | +- **username** - the username to use in logging in to this server. |
| 50 | +- **password** - password for the specified username. Entering the password in this file is acceptable only in limited situations with very low need for security. |
| 51 | + |
| 52 | +If you do not add a password to the server definition, anyone using the server needs to supply the password. Or, you can store the password securely in the system Keychain. The InterSystems Server Manager adds the following commands for managing stored passwords to the Command Palette: |
| 53 | + |
| 54 | +- **InterSystems Server Manager: Clear Password from Keychain** - remove password for selected server |
| 55 | +- **InterSystems Server Manager: Store Password in Keychain** - select a server and enter a password |
| 56 | +- **InterSystems Server Manager: Test Server Selection** |
| 57 | +- **InterSystems Server Manager: Test Server Selection (flush cached credentials)** |
| 58 | +- **InterSystems Server Manager: Test Server Selection with Details** |
| 59 | + |
| 60 | +## Configuring a Server Connection |
| 61 | + |
| 62 | +Select InterSystems ObjectScript from the settings editor extensions list. You need to edit the server configuration in the settings.json file, so your click *Edit in settings.json* under the heading **Objectscript: conn**. |
| 63 | + |
| 64 | +You should enter code something like this: |
| 65 | + |
| 66 | +```js |
| 67 | +"objectscript.conn": { |
| 68 | + "ns": "USER", |
| 69 | + "server": "tst", |
| 70 | + "active": true, |
| 71 | +}, |
| 72 | +``` |
| 73 | +The components of this server definition are: |
| 74 | + |
| 75 | +- **ns** - namespace to use on the server |
| 76 | +- **server** - server name as specified in the server configuration |
| 77 | +- **active** - specifies whether the connection is active. |
| 78 | + |
| 79 | +## Configuring Export from Server |
| 80 | + |
| 81 | +Select InterSystems ObjectScript from the settings editor extensions list. Find the section labeled **Objectscript: conn**. You can edit many of the export settings in the settings editor. For others you need to edit the settings.json file. |
| 82 | + |
| 83 | +You export configuration looks something like this: |
| 84 | + |
| 85 | +```js |
| 86 | +"objectscript.export": { |
| 87 | + "folder": "", |
| 88 | + "addCategory": true, |
| 89 | + "atelier": true, |
| 90 | + "generated": false, |
| 91 | + "filter": "", |
| 92 | + "category": "*", |
| 93 | + "noStorage": false, |
| 94 | + "dontExportIfNoChanges": false, |
| 95 | + "maxConcurrentConnections": 0 |
| 96 | +}, |
| 97 | +``` |
| 98 | +The components of this export definition are: |
| 99 | + |
| 100 | +- **folder** - Folder for source code. |
| 101 | +- **addCategory** - Add a category folder to the export path. |
| 102 | +- **atelier** - Export source code as Atelier does, with packages placed in subfolders. |
| 103 | +- **generated** - Export generated source code files. |
| 104 | +- **filter** - |
| 105 | +- **category** - Specifies a category of source code to export: CLS = classes; RTN = routines; CSP = csp files; OTH = other. The default is *, export everything. |
| 106 | +- ****noStorage** - Strip the storage XML on export. This is useful for multiple systems. |
| 107 | +- **dontExportIfNoChanges** - Don't update the local file if the content is identical to what is on the server. |
| 108 | +- **maxConcurrentConnections** - The maximum number of export connections. (0 = Unlimited) |
0 commit comments