Make sure that Node v8 is installed.
Also, mongodb. (On a mac with brew)
Finally, redis. (sessions)
Clone the repo
$ git clone https://github.com/cjessett/buoyfeed
Install dependencies:
$ yarn
Make sure mongodb is running. (with brew)
Make sure redis is running.
Note, mongo and redis config variables are assumed to be the default, you can set environment variables via a .env
file
Finally, to run the project for development:
$ yarn dev
Or, to run the project for production:
$ yarn build
$ yarn start
Bootstrapped with preact-pwa. A super fast progressive web app
with a small footprint.
This is Universal Javascript application that uses a web-worker model to fetch and then serve buoy data. The web
and the worker
are separate node processes, each using an app
instance.
The reason behind this architectural approach is to separate the concerns of handling web requests and processing background work. This allows either process to be scaled independently in response to site load.
Although this application uses only one RSS feed, it can scale to support many feeds and users. One approach would be to use a work queue for fetching and caching/persiting feeds.
Note that in development mode the worker is not used and the web process handles fetching and persisting the feed.
This is the entry into the app. It runs the web
process with an app
instance.
The Express application that handles web requests.
The process that fetches and saves buoy data from the given RSS feed using an app
instance.
The app
interface for the buoy and user data.
License
MIT