This repository contains a Web API sample built with Node.js. A Angular 2 client is used to communicate with the APIs. A lot of things in this repo are covered by a blog series.
This project has been forked from Thinktecture Node.js & ASP.NET Core 1.0 Web API and was adopted for usage in the Hackerstolz Hackschool.
HTTP GET api/customer/list
: Returns a list of all customersHTTP POST api/customer
: Creates a new customerHTTP DELETE api/customer/{id}
: Removes a customer
- Install Node.js > v5 .
- Execute
npm install
within the root of this repository to install all necessary dependencies. You will encounter somenpm err
ornpm warn
. That's okay, since this repository uses a lot beta versions. It will not break the application.
- To start the Web APIs execute
node index.js
insrc/nodejs
. It will then be accessible viahttp://localhost:5000
.
To start the Angular 2 Client, run npm run watch
within the root of the repository. You can access the client via http://localhost:8000
. The credentials are
- Username:
bob
- Password:
bob
Since both backends lack a support for user management, those credentials are the only one which are working. :-)
This section contains notable third-party libraries.
- restify Used for Web API hosting.
- restify-cors-middleware An actually working middleware for handling cors in restify.
- express Used for STS hosting.
- SequelizeJS Used to provide an ORM accessing the PostgreSQL database.