Publishing app
TypeScript JavaScript CSS HTML Shell
Latest commit c7082c6 Feb 15, 2017 @sandikbarr sandikbarr committed on GitHub Merge pull request #364 from PRX/feat/change-accounts
Allow users to change accounts for existing series

PRX Publish

This app is used to upload and publish audio for distribution. Initially, distribution will be to the PRX site and API, podcasts with dynamic ad serving, and embeddable web audio players.

Over time additional distribution channels are planned such as twitter cards and facebook sharing, CMS plugins for producer/station sites, publishing platforms like medium, tumbler, and, APIs like the PMP (Public Media Platform), youtube, and soundcloud.

The current broadcast distribution will also be merged to allow for licensing, subscribing, and distribution to station automation systems. We are also looking into supporting instant articles and AMP for stories published on PRX.

Once published, the other side of the coin is to collect metrics on these channels, and consolidate to provide a complete picture of an episode's impact and audience.


API and Backend Dependencies

Use defaults

To set-up environment custom values, start with these defaults in your .env file:

cp env-example .env
vim .env

You'll definitely need to set the "aws uploading" bucket/folder/signer if you plan to do any image/audio file uploading.

After this, publish will connect to and

Use local cms

To run cms locally, change the CMS_HOST in .env to

Use local id

To run id locally, change the AUTH_HOST in .env to

Next, you will need to create a client application set up, this is easiest to do from the console:

# start a console for

# in the console, save a new client application
client = ClientApplication.create(
  :url => "",
  :callback_url => "",
  :support_url => "",
  :image_url => "",
  :description => "",
  :template_name => "prx_beta",
  :user_id =>8,
  :name => "",
  :auto_grant =>true

# get the client.key and set it as AUTH_CLIENT_ID
puts "Add this to .env"
puts "AUTH_CLIENT_ID=#{client.key}"

Enter in the client id in .env, setting AUTH_CLIENT_ID to the value from above.

Local Install

Due to the complexity of installing node-sass in alpine-linux, it may be easier to just develop locally for the time being. Just make sure you have a modern node version installed (6.x.x, ideally).

# install dependencies
npm install

# setup pow proxy (see
echo 4200 > ~/.pow/publish.prx

# dev server
npm start

Docker Install

Or if you really want to, you can develop via docker-compose. This guide assumes you already have npm, docker and dinghy installed.

TODO: hot reloading not supported yet - this just builds the prod js.

# build a docker image
docker-compose build

# install dev dependencies locally, so docker can mount those folders
npm install

# make sure your AUTH_CLIENT_ID is the .docker one
vim .env

# run the docker image, will detect changes to local file system
docker-compose up

# open up a browser to view
open http://publish.prx.docker