Skip to content
OData V4 Server with MongoDB example
JavaScript TypeScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker - fix supervisor.conf Dec 5, 2016
src Support minimal conformance level Mar 21, 2017
test Support minimal conformance level Mar 21, 2017
.babelrc clear parameter decorator babel configs Nov 21, 2016
.gitignore untrack lib and public/bundle.* Nov 28, 2016
.istanbul.yaml Initial commit Nov 15, 2016
.npmignore Initial commit Nov 15, 2016
.npmrc wip es6 example Nov 17, 2016
Dockerfile add start scripts Jun 29, 2017
README.md update readme Dec 13, 2016
package.json Use odata-v4-server@next Jul 5, 2017
tsconfig.json outsource react app Dec 5, 2016
yarn.lock wip es6 example Nov 17, 2016

README.md

odata-v4-server-pgsql-example

MongoDB 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-mongodb 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):

About the examples

Technical details of this example

Setting up the connection

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

"mongodb://localhost:27017/northwind"

By default, the database will listen on port 27017 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.

You can’t perform that action at this time.