Skip to content

Commit 8b9b8c9

Browse files
committed
Added examples for the configImport and configTranslate functions.
1 parent 7440647 commit 8b9b8c9

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
```luceescript
2+
3+
// Import Lucee Server configuration to CFConfig JSON format
4+
data = {
5+
"extensions": [
6+
{
7+
"id": "EFDEB172-F52E-4D84-9CD1-A1F561B3DFC8",
8+
"name": "Lucene Search",
9+
"version": "2.4.2.4"
10+
}
11+
]
12+
};
13+
writeDump(ConfigImport(data, "server", "lucee_password"));
14+
15+
```
16+
17+
```luceescript
18+
19+
// Import Lucee Server configuration from a .CFConfig JSON file
20+
writeDump(ConfigImport("path/to/.CFConfig.json", "server", "lucee_password"));
21+
22+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```luceescript
2+
3+
//Translate Lucee Server XML configuration to .CFConfig JSON format
4+
configResult = configTranslate(
5+
source = "C:/lucee_old/tomcat/lucee-server/context/lucee-server.xml.cfm",
6+
target = "C:/lucee_new/tomcat/lucee-server/context/.CFConfig.json",
7+
type = "server",
8+
mode = "single"
9+
);
10+
writeDump(configResult);
11+
12+
```
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
*There are currently no examples for this function.*
1+
```luceescript
2+
3+
excelApp = CreateObject("com", "Excel.Application"); // Created Excel Application COM object
4+
workbook = excelApp.Workbooks.Add();
5+
ReleaseComObject(workbook); //released excelApp to prevent memory leak
6+
7+
```

0 commit comments

Comments
 (0)