Git Product home page Git Product logo

power-house's Introduction

PowerHouse

W.I.P - hence stuff is either broken or not there

Goal

A basic app for hosting websockets-based games.

Running this

  • Install Erlang and Elixir

  • Clone this repo, get dependencies and compile application

      git clone https://github.com/HashNuke/power-house.git power-house
      cd power-house
      mix deps.get
      mix relex.assemble
    
  • To start the app

      iex -S mix
    
  • Visit http://localhost:8080

  • If you change routes, you'll need to run the following in your console.

      r(PowerHouse) && PowerHouse.reload_routes()
    
  • For any other module changes or new modules, recompile it using r(YourModule) or c("path/to/module.ex") in the iex console itself.

Usage

  • Drop all your static assets in app/assets. Say you have app/assets/sample.png, it can be accessed on the app at /assets/sample.png

  • Put anything in app/views with a .dtl extension and it'll be compiled.

    Suppose you have app/views/index.dtl, you'll can render the template using :app_views.index([]). If you have to pass any variables use something like this :app_views.index([greeting: 'Hello World'])

    For views, ErlDTL (https://github.com/evanmiller/erlydtl) is being used. It is an implementation of Django templates in Erlang.

Notes

I don't know how to deploy using erlang releases yet. I was informed that Elixir doesn't yet have deployment/release mechanisms built in the mix tool. Rumour is that it's coming in v1.0. But this works for me now.

power-house's People

Contributors

hashnuke avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.