Skip to content

craigspaeth/positron

 
 

Repository files navigation

Positron

Positron is Artsy Writer or the editorial tool for Artsy.

ArtsyWriter

Meta

Build Status

Set-Up

  • Copy .env.example to .env in the root of the project and edit all REPLACE values with sensitive configuration obtained from positron-staging. This should help.
heroku config --app=positron-staging | grep -E `cat .env.example | grep REPLACE | cut -f1 -d= | xargs | tr ' ' \|` | sed -e 's/:\ /=/g' | sed -e 's/ //g'

Via Docker Compose

  • Install Docker for Mac
  • git clone git@github.com:<your username>/positron.git && cd positron
  • docker-compose up

This starts a new self-contained Docker instance that boots MongoDB, ElasticSearch and Node. Changes made to source-code located in api and client is automatically reloaded on browser-refresh; no need to restart the process.

To shut down, press ctrl+c or execute docker-compose down.

Manually

  • Install NVM
  • Install Node 6
nvm install 8
nvm alias default 8
  • Fork Positron to your Github account in the Github UI.
  • Clone your repo locally (substitute your Github username).
git clone git@github.com:craigspaeth/positron.git && cd positron
  • Install node modules
yarn install
  • Positron uses MongoDB as a database. To install MongoDB using homebrew do the following, if you would prefer to install manually check the documentation at MongoDB
brew install mongodb
  • Start the MongoDB database
mongod
  • Install and run elasticsearch
brew install elasticsearch
brew services start elasticsearch
  • Start the server
yarn start
  • Positron should now be running at http://localhost:3005/, open a browser and navigate to it. That will redirect you to staging, login as an Artsy administrator and it will redirect you to http://localhost:3005 logged into Writer with the default partner gallery channel (David Zwirner).

  • Run tests

yarn test
  • Make sure you have mongo running in the background or most tests will not work.

Debugging

Server side

Start the server using

yarn dev

This will start the server on port 3005 with inspect option.

  • In your Chrome go to: Chrome Inspect
  • Under Remote Target now you should see ./index.js, click on inspect link below it which will open a Chrome developer tools.

Now anywhere in your server side code you can put debugger and you should be able to debug.

Running tasks

Use the task command to run scripts written in ES6 or Coffeescript. This is helpful for running backfills.

yarn task scripts/backfill.js

Additional docs

You can find additional documentation about Positron in doc.

About

Otherwise known as Artsy Writer. The back-end posting tool for publishing on Artsy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.6%
  • CoffeeScript 37.0%
  • CSS 5.9%
  • HTML 1.7%
  • Other 0.8%