create-pb-tririga-react-app 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -15,17 +15,11 @@ This is a template for building IBM TRIRIGA UX applications using React, TypeScr
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
3. **Configure Environment**
|
|
18
|
-
|
|
18
|
+
Copy `.env.example` to `.env` and update the values for your local development and deployment settings.
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
cp .env.example .env
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
3. **Run Locally**
|
|
24
|
-
```
|
|
25
|
-
npm run dev
|
|
26
|
-
```
|
|
27
|
-
Open [http://localhost:5173](http://localhost:5173) (or the port shown in terminal).
|
|
28
|
-
|
|
29
23
|
## Deployment
|
|
30
24
|
|
|
31
25
|
To deploy to a TRIRIGA environment:
|
|
@@ -39,7 +33,10 @@ To deploy to a TRIRIGA environment:
|
|
|
39
33
|
2. **Configure Credentials**
|
|
40
34
|
Ensure your `.env` file has the correct `TRI_URL`, `TRI_USER`, and `TRI_PASSWORD`.
|
|
41
35
|
|
|
42
|
-
3. **
|
|
36
|
+
3. **Configure tririgaService.js file**
|
|
37
|
+
Update the TriAppConfig values (modelAndView, appExposedName) to match your application's configuration in TRIRIGA.
|
|
38
|
+
|
|
39
|
+
4. **Run Deployment**
|
|
43
40
|
The view name will be taken from the `name` field in `package.json`.
|
|
44
41
|
```
|
|
45
42
|
pnpm run build:deploy
|
|
@@ -26,16 +26,14 @@ export async function initTriAppConfig(): Promise<TriAppConfig> {
|
|
|
26
26
|
if (segments[0] === 'app' && segments[1]) {
|
|
27
27
|
appPath = `/app/${segments[1]}/`;
|
|
28
28
|
}
|
|
29
|
-
// Assume view name matches exposed name valid for standard deployments
|
|
30
|
-
const viewName = segments[1] || 'unknownView';
|
|
31
29
|
|
|
32
30
|
const config: TriAppConfig = {
|
|
33
31
|
instanceId: "-1",
|
|
34
32
|
tririgaUrl: window.location.origin,
|
|
35
33
|
contextPath: "/app",
|
|
36
|
-
modelAndView:
|
|
34
|
+
modelAndView: "modelAndView", //update to match your TRIRIGA application
|
|
37
35
|
appPath: appPath,
|
|
38
|
-
appExposedName:
|
|
36
|
+
appExposedName: "appExposedName", //update to match your TRIRIGA application
|
|
39
37
|
sso: false
|
|
40
38
|
};
|
|
41
39
|
|