Coder Social home page Coder Social logo

openui5-odata-client-server's Introduction

NodeJS OData server with OpenUI5 client

This is an small example project based on the n-odata-server utilizing OpenUI5 for the OData-client.

Requirements

The OData-server requires Node.js v6.x or v8.x.

See https://nodejs.org/ (or https://nodejs.org/de/ ) for more information abou how to install Node.js on your platform.

(if you switch the version of Node.js you have to delete node_modules and package-lock.json and install the node modules again with npm install)

Installation

After you have cloned (or downloaded and extracted) this repository run npm install to install the backend Node.js modules.

To start the application run one of these three commands, they are all doing the same

node server/server.js
node .
npm start

Now open http://localhost:3000 in a Webbrowser and you should see the OpenUI5-app.

Retrieve Data

To test the OData server it is recommended to use a browser plugin e.g. Postman.

Here are a few sample OData-requests to retrieve data with HTTP-GET-method:

Demo

See a running demo of this app at https://ui5app.kurmis.com (running on a the free heroku dyno, might take some time to start, so please be patient)

Authentication and Authorization

Data for Sflights is public for convinience.

But it is possible to protect all data access with authentication and authorization.

The n-odata-server leverages the authentication and authorization mechanisms supplied by loopback.

The n-odata-server has a wiki page to help getting started easily with this topic.

Using Docker to build an run the app

It's also quite easy to run the application in a Docker container. This might be a good idea if you e.g. don't have a local node.js installation yet.

To create a Docker container after pulling the github repo to your local pc just enter the following commands in a terminal window.

cd <project folder>
docker build -t node-odata-openui5 .
docker run -it -p 3000:3000 --name my-odata-server node-odata-openui5

Then you can acces the application in your browser by entering: http://<host of your Docker container>:3000/

You should now see the OpenUI5 application.

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.