https://github.com/ably/demo-typescript-jspm
The simplest possible example of using the Ably JS lib with TypeScript and JSPM
https://github.com/ably/demo-typescript-jspm
Last synced: 2 months ago
JSON representation
The simplest possible example of using the Ably JS lib with TypeScript and JSPM
- Host: GitHub
- URL: https://github.com/ably/demo-typescript-jspm
- Owner: ably
- Created: 2017-02-09T00:57:28.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-07-08T01:39:51.000Z (almost 3 years ago)
- Last Synced: 2025-12-26T10:48:06.021Z (6 months ago)
- Language: JavaScript
- Size: 197 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ably Node.js and Browser Typescript example
_[Ably](https://ably.com) is the platform that powers synchronized digital experiences in realtime. Whether attending an event in a virtual venue, receiving realtime financial information, or monitoring live car performance data – consumers simply expect realtime digital experiences as standard. Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime for more than 250 million devices across 80 countries each month. Organizations like Bloomberg, HubSpot, Verizon, and Hopin depend on Ably’s platform to offload the growing complexity of business-critical realtime data synchronization at global scale. For more information, see the [Ably documentation](https://ably.com/documentation)._
This repo contains the simplest possible example of how to use the [Ably JS library](https://github.com/ably/ably-js) with TypeScript and [the JSPM package manager](http://jspm.io/).
## Running Node.js Typescript example
Install the Node.js packaged modules:
```
npm install
```
Compile the node-example TypeScript:
```
tsc node-example.ts
```
Run the node-example Javascript file:
```
node node-example.js
```
## Running the Browser Typescript example
Install the Node.js packaged modules:
```
npm install
```
Install the JSPM packages:
```
./node_modules/.bin/jspm install
```
Install the JSPM loader:
```
./node_modules/.bin/jspm dl-loader
```
Install a static web server:
```
npm install http-server -g
```
Run the web server:
```
./node_modules/.bin/http-server -p 8080
```
Visit the browser example at [http://localhost:8080](http://localhost:8080)