Code Monkey home page Code Monkey logo

shee's Introduction

SHEE.app

The application consists of two main components

  • Client (where interactions with the participants happens)
  • Presenter (where the results are shown or new interactions are triggered)

Current client/presenter modules

  • poll : Presenter triggers a poll which can be viewed and voted on by the participants
  • counter : A simple Hello World module which counts how many participants are currently listenting to the presenter

Collection of useful things

Convert json into url parameters (works in browser)

const myParams = {'foo': 'hi', 'another': ["1", "2", "3"] ,'bar': '???'};
const u = new URLSearchParams(myParams).toString();
console.log(u);

ntfy.js script

The ntfy script is located in the /scripts/ntfy folder. To use the script, navigate to the root directory of the project and run the following commands:

After installing the modules, you can run the script in the following ways. (Alternatively you can also run the scripts from the package.json - but be aware that some arguments are expected. Set those in the run configuration)

Publish message to presenter/client topic

  • Note that the topic name is the channel name and presenter/client (with / delimiter) value (e.g. java-2022/presenter or java-2022/client)
npm run publish -- <channel/audience> <message.json>

Listen to client/presenter topic

npm run subscribeLive -- <channel/audience>

Retrieve last published event

npm run subscribe -- <channel/audience>

Running VAG.app

2 step Development environment

Step #1 โฌ‡๏ธ

To run VAG.app in a development environment, use the following command:

ng serve --configuration development

Step #2 โฌ‡๏ธ

Using Docker ๐Ÿณ๐Ÿ—๏ธ

VAG.app can also be deployed localy using the ntfy api Docker-Image with the docker-compose file named "local-setup.yaml". To deploy the application using Docker, run the following command (for dev enviroment only):

docker-compose -f local-setup.yaml up

Installing Docker on MAC

Installing the Package Manager HOMEBREW for macOS:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

If your not sure whether you have a clean homebrew docker installation, use this command in terminal to delete your current docker installation:

brew remove docker

Install the docker application:

brew install --cask docker

Install the docker command line tools:

brew install docker

Debugging Angular Apps

How to access the module in the Developer tools?

  • As an example for the poll-presenter component (assumes there is only one such component in the dom)
  • Here you either can access or trigger a method manually
ng.getComponent(document.getElementsByTagName("app-poll-presenter")[0])

Special notes

Polling user management

  • For now, if you want to flush the stored user, run the following command in the Developer Tools console
ng.getComponent(document.getElementsByTagName("app-poll-presenter")[0]).clearUserHistory();

Contributors ๐ŸŽ‰

shee's People

Contributors

biocarl avatar bohdoh avatar ru79jel avatar seta1609 avatar jefcos avatar neko5687 avatar languste1 avatar trklkddr avatar yungminox avatar baco98 avatar knollen avatar meisterrlampe avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

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