Giter Site home page Giter Site logo

ui5-local-neo's Introduction

ui5-local-neo

Custom Server middleware to provide proxy capabilities and support neo-app.json.

Installation

With Nodejs installed run the installation command in a terminal:

npm i ui5-local-neo

Usage

destinations.json File

Create a destination.json file in the root of your ui5 project with the following content:

{
    "sapui5": {
        "Description": "SAPUI5 Resources",
        "uri": "https://sapui5.hana.ondemand.com/"
    }
}

The above example is mandatory to load ui5 tools, but you can create your own destinations like this:

{
    "sapui5": {
        "Description": "SAPUI5 Resources",
        "uri": "https://sapui5.hana.ondemand.com/"
    },
    "awesome_destination": {
        "uri": "<sample-uri>",
        "credentials": {
            "user": "<username-to-basic-authentication>",
            "password": "<password-to-basic-authentication>"
        }
    }
}

The object key name in the destinations file must be the same configured in the neo-app.json file. You can find it inside the routes array. The name you're looking for is the property target.name in the file

neo-app.json File

{
	"welcomeFile": "/webapp/index.html",
	"routes": [{
		"path": "/resources",
		"target": {
			"type": "service",
			"name": "sapui5",
			"entryPath": "/resources"
		},
		"description": "SAPUI5 Resources"
	}, {
		"path": "/some-endpoint",
		"target": {
			"type": "destination",
			"name": "awesome_destination", // this is the name you must put in your destinations.json file
			"entryPath": "/path/to/some/endpoint"
		},
		"description": "Description"
	}],
	"sendWelcomeFileRedirect": true
}

When the ui5 requests to the /some-endpoint it will be redirected to our middleware and it will to the request to the uri you put inside destinations.json file.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

ui5-local-neo's People

Contributors

mlucascardoso avatar notelho avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.