Giter Club home page Giter Club logo

odata-v4-server-pgsql-example's Introduction

odata-v4-server-pgsql-example

PostgreSQL Server example for JayStack OData V4 Server

About JayStack OData V4 Server (odata-v4-server)

With JayStack OData v4 Server you can build your own data endpoints without the hassle of implementing any protocol-level code. This framework binds OData v4 requests to your annotated controller functions, and compiles OData v4 compatible response. Clients can access services through OData-compliant HTTP requests. We recommend the JayData library for consuming OData v4 APIs.

This example uses JayStack OData V4 Server (odata-v4-server) and odata-v4-pgsql repositories.

You can read more about JayStack OData V4 Server in our tutorial at ...

Also there are sevaral other examples on JayStack OData V4 Server (odata-v4-server):

Technical details of this example

Setting up the database

You have to create the database manually using this command after connecting to the default database:

CREATE DATABASE northwind;

Setting up the connection

You may customize the db connection options by editing connect.ts. By default, these are the options:

const pool = new pg.Pool({
  user: 'postgres',
  password: 'postgres',
  database: 'northwind'
});

By default, the database will listen on port 5432 therefore it is not set above.

Building the application

npm run build

Testing the application

npm test

Starting the application

npm start

Creating sample data

After starting the application (it will listen on localhost:3000 by default) you can generate / recreate the sample dataset by submitting localhost:3000/initDb. Alternatively if you start unit tests (npm test) then the database will be initialized automatically.

odata-v4-server-pgsql-example's People

Contributors

hasyee 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.