Skip to content

Latest commit

 

History

History
138 lines (97 loc) · 4.29 KB

Create_a_neo_app_json_Project_Configuration_File_28fa753.md

File metadata and controls

138 lines (97 loc) · 4.29 KB
loio
28fa7538c67e4280a0b7708de2951278

Create a neo-app.json Project Configuration File

The neo-app.json file contains all project settings for SAP Web IDE and is created in the root folder of your project. It is a JSON format file consisting of multiple configuration keys. The most important setting for you to configure is the path where the OpenUI5 runtime is located when starting the app.

Caution:

SAP Web IDE is no longer available via SAP Business Technology Platform trial accounts. Any references to SAP Web IDE in this documentation are only relevant for you if you have access to SAP Web IDE through a productive SAP BTP account. Please consider SAP Business Application Studio as an alternative. See App Development Using SAP Business Application Studio.


You do this using the "routes" key and defining an array of resource objects. For running an OpenUI5 tutorial, you only need two entries - one that configures OpenUI5 to be available with the path /resources, and another one that configures the test resources needed for the SAP Fiori launchpad integration with the path /test-resources.

Create two configuration objects that contain a path, a target, and a description attribute with more configuration settings. The path and the entryPath values will point to the location on the server where the OpenUI5 resources will be stored.

SAP Web IDE reads these settings automatically when running the app. You can see the whole configuration file in the code block below. Optionally, you can add the key welcomeFile to configure the entry point to your app. In web applications, this is typically the index.html file.

Note:

Depending on which SAP Web IDE version you are using, you might have to configure the project to run against the "snapshot" version of OpenUI5, otherwise the application will be launched with the OpenUI5 release that is delivered with SAP Web IDE. This is usually the latest version that is released publicly to customers.

You can check which version of OpenUI5 is loaded by opening the OpenUI5 debugging tools with this shortcut:

[Ctrl] + [Shift] + [Alt] /[Option] + [P]

If the version is too old for certain features of the tutorial, you have to add the version attribute to the target configuration entry and set the value to snapshot.


Procedure

  1. Select the New File icon and enter neo-app.json as the file name.

  2. Open the newly created file from the tree structure on the left side of the screen.

  3. Paste the following code in the neo-app.json and select Save:

    {
      "welcomeFile": "index.html",
      "routes": [
        {
          "path": "/resources",
          "target": {
            "type": "service",
            "name": "sapui5",
            "version": "snapshot",
            "entryPath": "/resources"
          },
          "description": "SAPUI5 Resources"
        },
        {
          "path": "/test-resources",
          "target": {
            "type": "service",
            "name": "sapui5",
            "entryPath": "/test-resources"
          },
          "description": "SAPUI5 Test Resources"
        }
      ]
    }
    

Here's what the settings for the two resources mean:

Setting

Explanation

path

Application path to be mapped

type

Type of resource

name

Name of the resource

entyPath

Path prepended to the request path

For more information, see Accessing SAPUI5 Resources in the SAP Business Technology Platform documentation.