DEPRECATED - Migrated to https://github.com/mozilla/fxa
Перейти к файлу
Zach Carter ec09cdc634 Merge pull request #618 from mozilla/issue-530-ver-txt
feature(server): add /ver.json endpoint and route definition processing.
2014-02-28 13:58:54 -08:00
app Merge pull request #633 from mozilla/issue-557-signup-complete-screen 2014-02-27 23:07:09 -08:00
grunttasks fix(server) render index.html on the server for l10n. 2014-02-27 19:29:40 +00:00
locale Merge pull request #613 from mozilla/issue-610-rename-locales 2014-02-25 16:48:40 -08:00
scripts Merge pull request #644 from mozilla/rfk/cleanup-build-tempfiles 2014-02-27 17:20:36 -08:00
server feature(server): add /ver.json endpoint that responds with version and commit info. 2014-02-28 11:30:24 +00:00
tests feature(server): add /ver.json endpoint that responds with version and commit info. 2014-02-28 11:30:24 +00:00
.awsbox.json add static directory configuration param and fix awsbox config 2013-12-10 15:08:32 -08:00
.bowerrc Fixed gitignore. Added .bowerrc. 2013-12-04 14:17:06 -08:00
.editorconfig Generated basic Yeoman project. 2013-12-04 11:55:48 -08:00
.gitattributes Generated basic Yeoman project. 2013-12-04 11:55:48 -08:00
.gitignore Sass-ification, lets try this again... 2014-02-20 11:58:04 +00:00
.jscs.json Last bit of jscs cleanup 2014-01-21 17:38:11 -08:00
.jshintrc retighten up the linting rules 2014-02-11 11:48:00 -08:00
.travis.yml remove duplicate config entries 2014-02-20 11:37:44 -08:00
CHANGELOG.md feat(build): Add a `grunt version` task to stamp a new version. 2014-02-24 11:10:54 +00:00
CONTRIBUTING.md feature(contributors): Adding CONTRIBUTING and CONTRIBUTORS files 2014-02-27 10:37:15 -08:00
CONTRIBUTORS.md feature(contributors): Adding CONTRIBUTING and CONTRIBUTORS files 2014-02-27 10:37:15 -08:00
Gruntfile.js Cleaning up the Gruntfile into the grunttasks dir 2014-02-17 17:21:13 +00:00
README.md Update README.md 2014-02-27 16:55:26 -08:00
bower.json Adding explicit Git hashes for a few modules 2014-02-26 15:39:04 -08:00
lockdown.json feature(server): add /ver.json endpoint that responds with version and commit info. 2014-02-28 11:30:24 +00:00
package.json feature(server): add /ver.json endpoint that responds with version and commit info. 2014-02-28 11:30:24 +00:00

README.md

Firefox Accounts Content Server

Build Status

Static server that hosts Firefox Account sign up, sign in, email verification, etc. flows.

Prerequisites

  • node 0.10.x or higher
  • npm
  • Grunt (npm install -g grunt-cli)
  • PhantomJS (npm install -g phantomjs)
  • bower (npm install -g bower)
  • libgmp
    • On Linux: install libgmp and libgmp-dev packages
    • On Mac OS X: brew install gmp
  • fxa-auth-server running on 127.0.0.1:9000.

Development Setup

cp server/config/local.json-dist server/config/local.json
npm install
npm start

Testing

Setup

There is quite a bit of setup to do before you can test this service, which is non-optimal, but for now:

  • Set up saucelabs credentials (we have an opensource account: SAUCE_USERNAME=intern-example-ci SAUCE_ACCESS_KEY=89ac3089-17b3-4e9b-aaf3-c475b27fa441)
  • PhantomJS: phantomjs --webdriver=4444 (see Prerequisites)
  • Run the Firefox Content Server locally: npm start
  • Run an instance of the fxa-auth-server at 127.0.0.1:9000.

e.g. in shell form:

export SAUCE_USERNAME=intern-example-ci
export SAUCE_ACCESS_KEY=89ac3089-17b3-4e9b-aaf3-c475b27fa441
phantomjs --webdriver=4444 &
cd fxa-auth-server
npm start &
cd ../fxa-content-server
npm start &

Running the tests

To run tests locally against phantomjs:

npm test

To run tests against saucelabs:

npm run-script test-remote

Advanced local testing using headed browsers

It is possible to run the Selenium tests against local browsers like Firefox, Chrome, and Safari.

Prerequisites:

Configuration:

  • edit tests/intern.js to select the browsers to test under environments.
  • comment out phantom

Running the tests

  • Start the Selenium Server: java -jar selenium-server-standalone-2.38.0.jar
  • Stop PhantomJS if it is running.
  • from the fxa-content-server directory, type npm test

Configuration

The default auth server is http://api-accounts.dev.lcip.org. To change this, edit server/config/*.json on your deployed instance.

{
  'fxaccount_url': 'http://your.auth.server.here.org'
}

Grunt Commands

Grunt is used to run common tasks to build, test, and run local servers.

  • grunt jshint - run JSHint on client side and testing JavaScript.
  • grunt build - build production resources.
  • grunt clean - remove any built production resources.
  • grunt test - run local Intern tests.
  • grunt server - run a local server running on port 3030 with development resources.
  • grunt server:dist - run a local server running on port 3030 with production resources. Production resources will be built as part of the task.
  • grunt version - stamp a new version. Updates the version number and creates a new CHANGELOG.md

Servers

License

MPL 2.0