Trying to figure out how to change the name. This project is meant to be a rapid platform that Angular2 apps and Demo's requiring web services can be rapidly prototyped. The platform should actually scale pretty well look for benchmarks in the future and will be even more production ready with the addition of MongoDB after initial prototype.
- Python (tested with 2.7.11 only)
- pip
- Visual C++ for Python 2.7
- Node.js (tested with 4.2.6)
- npm
Clone the repository with "git clone https://github.com/totalknowledge/angular-demos.git"
- pip install twisted
- pip install cyclone
- npm install
npm start
The Angular2 documentation site is an excellent resource on where to start.
The web services can be accessed without any additional setup. If you want to use a collection, lets say Books, then simply start using the api of /api/books or /api/v0/books the API supports POST, PATCH, PUT, GET, and DELETE. Using our books example we have the following possible web services for Books
API Call | Result |
---|---|
/api/books | Returns the full collection of Books |
/api/books/{id} | Returns a single record with id of {id} |
API Call | Result |
---|---|
/api/books | Creates a new record in the collection, and returns the created record. |
API Call | Result |
---|---|
/api/books/{id} | Updates the record {id} with the new record sent via request. |
API Call | Result |
---|---|
/api/books/{id} | Updates the record {id} with a fragment of the record with updates made. |
API Call | Result |
---|---|
/api/books | Deletes all records in the collection. |
/api/books/{id} | Deletes record specified by {id}. |