Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lgrignon/jsweet-node-example
[JSweet version 2 example running!] The classic Socket.IO example: a simple instant messenger, written in Java, thanks to the JSweet transpiler. Server is spawned by Node.js and Web UI is powered by Angular. Both are linked together by Socket.IO
https://github.com/lgrignon/jsweet-node-example
Last synced: about 7 hours ago
JSON representation
[JSweet version 2 example running!] The classic Socket.IO example: a simple instant messenger, written in Java, thanks to the JSweet transpiler. Server is spawned by Node.js and Web UI is powered by Angular. Both are linked together by Socket.IO
- Host: GitHub
- URL: https://github.com/lgrignon/jsweet-node-example
- Owner: lgrignon
- License: apache-2.0
- Created: 2015-12-11T12:38:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T20:17:12.000Z (almost 2 years ago)
- Last Synced: 2023-02-26T21:22:12.913Z (over 1 year ago)
- Language: Java
- Homepage: http://www.jsweet.org
- Size: 394 KB
- Stars: 11
- Watchers: 5
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSweet 3 + Node.js / Socket.IO server + Angular material web client example
The classic Socket.IO example: a simple instant messenger. Server is spawned by Node.js and Web UI is powered by Angular. Both are linked together by Socket.IO
Find more info about this example on the original tutorial by following this link: http://socket.io/get-started/chat/
All these example are written in Java using the JSweet APIs (candies). They are then transpiled to JavaScript by the JSweet transpiler.
###Try it [here](http://examples.jsweet.org:1337): http://examples.jsweet.org:1337
## Build it
Just build it using Gulp:```
> git clone https://github.com/lgrignon/jsweet-node-example.git
> cd jsweet-node-example
> npm install
> npx bower install
> npx gulp buildClientAndServer
> npx gulp static
````gulp buildClientAndServer` executes behind the scene `gulp buildServer` and `gulp buildClient`, which runs respectively `mvn generate-sources -P server` and `mvn generate-sources -P client`.
`gulp static` launches static resources generation such as jade transpilation, resources copy, bower libs concat & minify.
The output folder is `build`.## Run it
Once built:
```
> cd build
> node server/Globals.js
```Then, one could browse the chat by accessing [http://localhost:1337/](http://localhost:1337/) in a browser.
## Prerequisites
The `node` and `npm` executables must be in the path (https://nodejs.org). `bower` and `gulp` should be installed as well.
Install Maven (https://maven.apache.org/install.html).