Positron is Artsy Writer or the editorial tool for Artsy.
- State: production
- Production: https://writer.artsy.net/ | Heroku
- Staging: http://stagingwriter.artsy.net/ | Heroku
- Github: https://github.com/artsy/positron/
- CI: CircleCI; merged PRs to artsy/positron#master are automatically deployed to staging. PRs from
staging
torelease
are automatically deployed to production. Start a deploy... - Point People: @craigspaeth, @kanaabe, @eessex
- Copy
.env.example
to.env
in the root of the project and edit allREPLACE
values with sensitive configuration obtained frompositron-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'
- 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
.
- 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.
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 oninspect
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.
You can find additional documentation about Positron in doc.