Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Commit

Permalink
Clean up README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sjmf authored Nov 10, 2016
1 parent b2f8ee2 commit 2ed5ed7
Showing 1 changed file with 26 additions and 67 deletions.
93 changes: 26 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@
> generated with [angular-cli](https://github.com/angular/angular-cli).
This demo app implements a more ng2-faithful way of connecting to a message
queue and subscribing to messages from a STOMP topic. Includes a Typescript
queue and subscribing to messages from a STOMP topic. Uses the Typescript
interface definition for Jeff Mesnil's excellent STOMP.js JavaScript library,
a STOMPService which subscribes to messages, and an example 'raw data'
component which uses the Observable type to data-bind messages to the DOM.

For a newer demo using MQTT instead of STOMP, see [https://github.com/sjmf/ng2-mqtt-demo](https://github.com/sjmf/ng2-mqtt-demo)
For a demo using MQTT instead of STOMP, see [https://github.com/sjmf/ng2-mqtt-demo](https://github.com/sjmf/ng2-mqtt-demo)

To get more help on the `angular-cli` use `ng --help` or go check out the
[Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

## Quick Start

> As well as the following, you will also need the appropriate toolchain for
> Typescript, and a message queue supporting STOMP, the Simple Text Oriented
> As well as the following, you will also need the [angular-cli](https://github.com/angular/angular-cli)
> and a message broker supporting STOMP, the Simple Text Oriented
> Messaging Protocol. This example was built using [RabbitMQ WebSTOMP](http://www.rabbitmq.com/blog/2012/05/14/introducing-rabbitmq-web-stomp/)
> but other brokers will also work. (Shameless self-plug: if you want SSL with
> your RabbitMQ socks, you might want to read [my blog post](https://sjmf.in/wp/?p=86).)

To get started running this app locally (assuming you've already got Typescript):
To get started running this app locally (assuming you've already got angular-cli):

```bash
# Clone the repo
Expand All @@ -38,53 +41,41 @@ this, you can run the application locally:

```bash
# Run the application locally
npm start
ng serve
```

Then [http://localhost:4200](http://localhost:4200) should open in your browser.
The app will automatically reload if you change any of the source files.

> You can overrride the default port by changing it in the `.emebr-cli` file.
> You can override the default port by changing it in the `.ember-cli` file.

### Build

Run `ng build` to build the project. The build artifacts will be stored in the
`dist/` directory. Use the `-prod` flag for a production build.


## Layout

The source is located under the `app` folder:
The source is located under the `app` folder. Partial tree (excluding `.ts`
`.html` etc component files under folders, testing framework files,
and the `e2e` End to End testing folder containing app behaviour testings
and definitions):

```
├── e2e * End To End testing folder
│ ├── app.e2e-spec.ts * App behaviour testings
│ ├── app.po.ts * App behavior definitions
│ └── tsconfig.json * Typescript transpiler options
├── src * Source folder
│ ├── api * Example API folder (static for demo)
│ │ └── config.json * Configuration file for STOMP
│ │
│ ├── app * Application folder
│ │ ├── components * Components folder
│ │ │ ├── rawdata * Data streaming component folder
│ │ │ │ ├── rawdata.component.css * Component css file
│ │ │ │ ├── rawdata.component.html * Component html file
│ │ │ │ ├── rawdata.component.spec.ts * Component testings
│ │ │ │ └── rawdata.component.ts * Example data streaming component
│ │ │ │
│ │ │ └── status * Status component folder
│ │ │ ├── status.component.css * Component css file
│ │ │ ├── status.component.html * Component html file
│ │ │ ├── status.component.spec.ts * Component testings
│ │ │ └── status.component.ts * STOMP Status component
│ │ │ ├── rawdata * Example data streaming component folder
│ │ │ └── status * STOMP Status component folder
│ │ │
│ │ ├── services * Services folder
│ │ │ ├── config * Config service folder
│ │ │ │ ├── config.service.spec.ts * Service testings
│ │ │ │ └── config.service.ts * Service which retrieves the configuration
│ │ │ │
│ │ │ └── stomp * STOMP service folder
│ │ │ ├── index.ts * Indexing file
│ │ │ ├── stomp.config.ts * Type definition for a STOMP configuration
│ │ │ ├── stomp.service.spec.ts * Service testing
│ │ │ └── stomp.service.ts * STOMP ng2 service definition
│ │ │ ├── config * Config service folder (retrieves the configuration)
│ │ │ └── stomp * STOMP service folder (ng2 definition for a STOMP configuration)
│ │ │
│ │ ├── app.component.css * Component css file
│ │ ├── app.component.html * Component html file
Expand All @@ -100,27 +91,19 @@ The source is located under the `app` folder:
│ │ ├── environment.prod.ts * Production environment settings
│ │ └── environment.ts * Development environment settings
│ │
│ ├── favicon.ico * App favorite icon
│ ├── index.html * The root page served to browser
│ ├── main.ts * App bootstrap
│ ├── polyfills.ts *
│ ├── styles.css * Main css file
│ ├── test.ts * Testings bootstrap
│ ├── tsconfig.json * Typescript transpiler options
│ └── typings.d.ts * Typescript typings definition file
├── .editorconfig * Editor configuration file
├── .gitignore * Git ignore file
├── README.md * This file
├── angular-cli.json * Angular CLI configuration file
├── karma.config.js * Karma configuration file
├── package.json * Package info and list of dependencies to install
├── protractor.config.js * Protractor configuration file
└── tslint.json * Typescript Linter configuration file
```

> Two extra directories will be generated: `dist` for the compiled app, and
`node_modules`, for the installed node packages.
> Excluded from this listing for brevity: .
> The `node_modules` directory will also be generated for the installed node packages.

## Extending
Expand Down Expand Up @@ -166,27 +149,3 @@ MIT Licence. Essentially: do what you like with it, but give credit if credit's
due, and it's not my fault if this code eats your product/machine/whatever.


## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Deploying to Github Pages

Run `ng github-pages:deploy` to deploy to Github Pages.

## Further help

To get more help on the `angular-cli` use `ng --help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

0 comments on commit 2ed5ed7

Please sign in to comment.