Giter VIP home page Giter VIP logo

elmsockets's Introduction

Elm Sockets

This is a small utility library that allows the usage of Socket.io to communicate with Elm. Files must be compiled including the SocketIO.js and the socket.io.js files.

#Building

Elm must be installed. If not see Elm Language.

##Library Only To build only the Socket.IO bindings for Elm run:

  • make

##Samples To build the sample projects using Elm Sockets you need node.js installed. This is anyways a requirement to use Socket.io. Once node.js is installed, you can build samples with:

  • make samples

To run the samples, go to the samples/ folder and run "node app.js" in the shell. You should be able to browse the samples by opening "localhost:8888" in your browser.

#Usage

To compile a project that uses Elm Socket you must include the socket.io.js file as well as the file out/SocketIO.js. The compilation command should look like:

  • elm --import-js="/path/to/out/SocketIO.js" --import-js="/path/to/node_modules/socket.io-client/dist/socket.io.js" myFile.elm

Check out more samples in the samples/ directory. Chat shows how to build an application that passes chat messages. It requires the node.js app to forward the messages though.

elmsockets's People

Contributors

netogallo avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.