Giter Site home page Giter Site logo

slackbothx's Introduction

Sample Haxe Slackbot in nodejs using Xene and Ava

An experiment on consuming TS and JS libraries from Haxe.

Why Haxe?

Todo

  • Better type definitions for Xene (externs) - right now I'm using a lot of Dynamic, so the typing info is weak;
  • I'm not even scratching the surface of Haxe capabilities here, so there's a lot of room for improvement!;
  • Add a linter (there are some for Haxe, looking at the options now);
  • Think about how to write tests, in Haxe, JS or TS? (Haxe classes can be consumed from plain js if needed).

Misc

  • The (haxe) source code is in the haxe_src/ directory;
  • IF needed, TS/JS can be used alongisde Haxe, although I see no real reason for that, but then TS and Babel would need to be included.

Compiling and running

  1. First, install Haxe: http://haxe.org/download/. Use vscode with https://github.com/vshaxe/vshaxe to start with. There also https://github.com/jdonaldson/vaxe for Vim.

  2. Then install the required Haxe libraries:

haxelib install build.hxml
  1. Setup your slack app and bot token as env vars (See the config/ dir);

  2. Then compile and run:

haxe build.hxml && NODE_PATH=./dest node dest/src/app.js

You can also use npm run start to run the command above or npm run watch to run it eveytime a file changes.

Be sure to set the env vars defined in config/custom-environment-variables.yml before.

slackbothx's People

Contributors

fullofcaffeine avatar

Watchers

James Cloos avatar  avatar

Forkers

r8code

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.