Coder Social home page Coder Social logo

spidymq-producer's Introduction

SpidyMQ Producer

A service that produces math problems for a SpidyMQ message queue. It is complemented with a web application for visualizing the problems that get generated. This service also listens for solutions to the problems it generates which will also be visible via the web application.

How to use this web application

As the summary states, this app is meant to produce problems and provide visualizations. When you load the application in your browser, you will see the producer's name, a simple description, and probably a big blank area. This area will fill up as the producer generates math problems. The problems will be automatically updated with their solutions thanks to Socket.IO but only if a consumer is available to process them. So if you are seeing a bunch of problems with no solutions, make sure you have a consumer running.

Setting up the web application

This web application is built using GruntJS and gets its web dependencies from Bower. Node Foreman is also used to run the application, which is really handy for dealing with environment variables and scaling service. First things first, let's get your global npm modules installed.

npm install -g grunt-cli bower foreman

We will also need to get our local project dependencies installed.

npm install
bower install

With all our files in place, we can build the files. If you are doing development, grunt is setup to use nodemon and watchers to rebuild and restart the server while you are working on it. Just use the default grunt task for this. Unfortunately there currently any live reload support to you still have to click refresh in your browser

grunt production
grunt

Setting up your environment

Almost ready, I promise, let's get your environment setup. There are a couple ways to manage your environment. You can use Node Foreman .env files which get autoloaded when the application is run, or you can create your own config/default.js configuration file. Config looks at NODE_ENV and then loads the corresponding config file. When NODE_ENV is not present, default is used. Checkout [config/default.example.js] for an example of what configuration values are needed.

Running the application

Starting the web application is quick and simple. You can use Node Foreman, npm start (which uses Node Foreman), or just start index.js yourself. You will need to include the --harmony flag since this web application is using plenty of neat and shiny ES6 features.

nf start
npm start
node --harmony index.js

One thing to be aware of, this application needs to be started after the SpidyMQ Service is up and running. It does not currently have support for reconnecting to the service.

spidymq-producer's People

Contributors

spidy88 avatar

Watchers

James Cloos avatar

spidymq-producer's Issues

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.