Monorepo for Firefox Accounts
Перейти к файлу
Vlad Filippov dfe272fc33 add 321done untrusted to tests 2015-05-08 09:59:59 -04:00
_scripts enable browser.pocket.enabled 2015-05-06 23:08:33 -04:00
test add 321done untrusted to tests 2015-05-08 09:59:59 -04:00
.gitignore Add local syncserver instance. 2015-03-27 16:12:06 +11:00
.travis.yml add sync server requirements 2015-04-07 16:01:53 -04:00
README.md Update README.md 2015-04-22 09:54:12 -04:00
package.json add logger 2015-03-25 18:27:03 -04:00
servers.json add 321done untrusted to tests 2015-05-08 09:59:59 -04:00
start-main.sh add a script to only start main servers 2015-05-04 10:07:56 -04:00

README.md

fxa-local-dev Build Status

An easy way to contribute to Firefox Accounts

Getting Started

  • Install required system dependencies
  • Clone this repository and run npm install. Here is the full command:
git clone https://github.com/vladikoff/fxa-local-dev.git && cd fxa-local-dev && npm i

After installation completes you can visit 127.0.0.1:3030 and use the PM2 tool to start, stop and read server logs. Most common commands are as follows:

  • ./pm2 start servers.json - start all servers.
  • ^ (WARNING: running the above command multiple times will spawn more of the same servers).
  • ./pm2 kill - stop all servers.
  • ./pm2 status - display running servers.
  • ./pm2 logs - logs for all servers (note: this must be used to verify accounts).
  • ./pm2 logs 1 - display logs for process 1.
  • More commands on the PM2 Readme.

Use npm run update to fetch the latest changes on the master branch.

Use npm start to start Firefox with local sync configurations. Available options:

  • FXA_ENV=local or latest or stable (NOTE: local is default).
  • FIREFOX_BIN=/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin npm start

Workflow

This is an example workflow for fxa-local-dev. After installing fxa-local-dev the servers should automatically start up. Use ./pm2 status command to check the status of the servers:

To avoid wasting computer resources while not working on FxA make sure to stop the servers using ./pm2 kill. Once you are back working on FxA just use the ./pm2 start servers.json command to bring the servers back up. Keep in mind that the memory store will restart and all your database data will be brand new.

Use the ./pm2 logs command to get the logs of all servers. You may also use ./pm2 logs [id] to just see the logs for that particular server. When you signup for an account via localhost:3030/signup the auth-server logs will print out the verification link that you need to copy paste into your browser to verify your account:

If you get an error status for any of the servers please verify that you installed all required dependencies. Otherwise file an issue on this repository.

Dependencies

Git, node.js, Python 2.6+, Redis, libgmp, graphicsmagick.

OSX (with Brew):

brew install gmp redis graphicsmagick
sudo easy_install pip && sudo pip install virtualenv

(You might also need to run xcode-select --install to get OS X Command Line Tools)

Ubuntu:

sudo apt-get install libgmp3-dev graphicsmagick redis-server python-virtualenv python-dev

FreeBSD:

Use bigint fix: "bigint": "git://github.com/frasertweedale/node-bigint.git#fix/freebsd-build"