This is the common Horizon chat app ported to Aurelia.
Make sure you have RethinkDB installed.
Install horizon
npm install -g horizonInstall aurelia-cli
npm install -g aurelia-cliInstall dependencies by running the npm install from the project root.
Run the following command to start Horizon & Aurelia in dev mode:
npm startYou should get a url in the console with the localhost URL to run the app.
The following steps will help you get a project set up to start using Horizon & Aurelia together.
Create a new aurelia app. (We'll assume it is named app)
au newCreate a new horizon project
hz init hztempMove the .hz directory into aurelia's app folder.
mv hztemp/.hz appYou may also want to edit .hz/config.toml to change the name of your horizon app. Also, copy the contents of hztemp/.gitignore into your aurelia's .gitignore
Go to the aurelia root directory.
cd appInstall concurrently
npm install concurrently --save-devEdit package.json and add the start script.
"scripts": {
"start": "concurrently \"hz serve --dev\" \"au run --watch\" "
}Install @horizon/server
npm install @horizon/server --saveAdd the horizon client to your vendor bundle in aurelia_project/aurelia.json
"prepend": [
"node_modules/bluebird/js/browser/bluebird.core.js",
"node_modules/@horizon/client/dist/horizon.js",
"scripts/require.js"
],Now you can start Horizon and Aurelia
npm startInspect the source of this project to see how horizon is used as a service.