@copart/ops-browser-notification

0.0.5 • Public • Published

ops-app-boilerplate

Gitter

Usage

ops-browser-notification is an HOC that takes the following props: topics: list of topcis that a client can subscribe to (defaulted to ops news) onMessageForeground: triggered whenever a notification is published and browser tab is on focus

To use simply wrap your main component with withFirebase:

const Comp = () => <div .../>
withFirebase(Comp)

Apache Configuration

To make everything work seamlessly, you will need to add this to your /etc/apache2/httpd.conf file.

Define PORT 5000
Define applicationURL ops-browser-notification 

ProxyPassMatch /{applicationURL}/(.*)$ http://localhost:${PORT}/$1
ProxyPassReverse /{applicationURL}/(.*)$ http://localhost:${PORT}/$1

ProxyPassMatch /{applicationURL} http://localhost:${PORT}/$1
ProxyPassReverse /{applicationURL} http://localhost:${PORT}/$1

# URL to fetch configurations for your application. We included handlers to provide profile to be used
# and application name to which we have to fetch configurations from cloud config server
ProxyPass /configurations http://localhost:${PORT}/configurations
ProxyPassReverse /configurations http://localhost:${PORT}/configurations

ProxyPassMatch /(.*\.hot-update\.js.*) http://localhost:${PORT}/$1
ProxyPassReverse /(.*\.hot-update\.js.*) http://localhost:${PORT}/$1

ProxyPass /static/js/bundle.js http://localhost:${PORT}/static/js/bundle.js
ProxyPassReverse /static/js/bundle.js http://localhost:${PORT}/static/js/bundle.js

ProxyPass /static/js/bundle.js.map http://localhost:${PORT}/static/js/bundle.js.map
ProxyPassReverse /static/js/bundle.js.map http://localhost:${PORT}/static/js/bundle.js.map

ProxyPassMatch ^/(.*flag_.*)$ http://localhost:${PORT}/$1
ProxyPassReverse ^/(.*flag_.*)$ http://localhost:${PORT}/$1

# supports hot reloading for application created
ProxyPass /__webpack_hmr http://localhost:${PORT}/__webpack_hmr
ProxyPassReverse /__webpack_hmr http://localhost:${PORT}/__webpack_hmr

Running the App

Run the following in terminal once you are inside the root directory of your application:

yarn start

/@copart/ops-browser-notification/

    Package Sidebar

    Install

    npm i @copart/ops-browser-notification

    Weekly Downloads

    5

    Version

    0.0.5

    License

    none

    Unpacked Size

    102 kB

    Total Files

    25

    Last publish

    Collaborators

    • omkarkyatham
    • saiteja.murarisetty
    • mapothani
    • shivani_padma
    • saiprasad_3103
    • dineshgrandhi--copart
    • yilinliu7
    • dbkokkirig
    • mdelong422
    • chandrashekar.gandla
    • arpeechara
    • ravikirancopart
    • akashpatti
    • nikhilnarula
    • shwetanairco
    • lizhangxcopart
    • raghurudraraju-copart
    • adganapath
    • jagannadhtipirneni
    • prasanth.ivs