Skip to content
Helmut Tammen edited this page Oct 21, 2016 · 12 revisions
                        _       _                                           
  _ __         ___   __| | __ _| |_ __ _       ___  ___ _ ____   _____ _ __ 
 | '_ \ _____ / _ \ / _` |/ _` | __/ _` |_____/ __|/ _ \ '__\ \ / / _ \ '__|
 | | | |_____| (_) | (_| | (_| | || (_| |_____\__ \  __/ |   \ V /  __/ |   
 |_| |_|      \___/ \__,_|\__,_|\__\__,_|     |___/\___|_|    \_/ \___|_|   
                                                                            

Welcome to the n-odata-server wiki!

Here you find detail information about the project as well as developer information.

Release Notes

Read what has changed in the last releases. This link leads to the page that shows you all releases and their notes. [Release Notes](Release Notes)

Tutorials

We plan to write a series of tutorials that demonstrate the use of n-odata-server.
The first tutorials are already available.

Authentication and Authorization

n-odata-server leverages the authentication and authorization mechanisms supplied by loopback. We have provided this wiki page to help you get started easily with this topic.

Developer information

Read this if you want to contribute to the project or if you want to fork it and do some further development in your forked repository

Developing the n-odata-server package

Clone it from Github

To clone this project enter git clone https://github.com/htammen/n-odata-server.git n-odata-server This will clone the repository to your local folder n-odata-server

We use Typescript

We use Typescript for developing the application.

Transpile ts to js

To transpile the typescript files to javascript files you can either use the functionality of you IDE / Editor or you can start grunt at the command line. If you want to use an IDE / Editor IntelliJ/IDEA, Microsoft Visual Studio, Microsoft Visual Code and others should support Typescript very well. The grunt script watches all your .ts files and transpiles them to a .js file on the fly on every change.

Typings / Type definitions / DefinetelyTyped

Type definitions help the transpiler finding errors at compile time. This is normally only possible at runtime in Javascript. To let the transpiler know which operation on a type or attributes on a Type/Class are available for plain Javascript libraries Typescript defines so called type definitions. These are managed via Github.
To install and use the type definitions in our project we use typings, a npm package for managing type definitions. To use it just install the package globally
npm install typings --global
Then run
typings install
to install all already used type definitions into your local workspace.
If you want to install an additional type definition, e.g. the one for the async library do the following:
typings install async --ambient --save
If in the file in that you want to use the type definition the following first line already exists you don't have to do anything else. Otherwise insert this line into the beginning of the file.
/// <reference path="../../typings/main.d.ts" />

Here you find a good explanation of type definitions

Type definitions and Git

Typings downloads the type definitions to the folder typings. It is not necessary to checkin the downloaded type definitions cause they can all be automatically downloaded by typing typings install on the command line (similar as node modules). The only file that needs to be available in the Git repository is typings.json that is stored in the root directory of the project.

Testing

Testing of n-odata-server is done with mocha, chai, sinon and some other tools that are described on the test page of this wiki.

Edit on the Web with Cloud9

To get an easy entry into contributing to the project you can use the Cloud9 development platform. Cloud9 is a great Web-based development platform for node.js projects. You don't have to download or buy IDEs, node.js and npm itself or have to configure it.

Have a look here for more details on using it for n-odata-server development