fxa/packages/fxa-content-server
Ben Bangert 245568d56c
chore: update typescript
Because:

* Using the latest everywhere helps with consistency and smaller build
  size.

This commit:

* Updates for TypeScript 3.9.7 everywhere in FxA.
2020-08-15 11:15:44 -07:00
..
app feat(settings): metrics reporting 2020-08-13 10:24:56 -04:00
docs feat(auth-client): replace fxa-js-client with fxa-auth-client 2020-07-21 09:08:35 -07:00
grunttasks fix(l10n): fixed l10n-extract script 2020-06-26 11:03:10 -07:00
locale
scripts feat(ci): use store_test_results in circleci for content-server 2020-06-15 15:30:53 -07:00
server Merge pull request #6104 from SrilalS/main 2020-08-12 12:33:50 -05:00
tests fix(server): register 2FA inline setup routes with server 2020-08-06 14:46:29 -07:00
.eslintignore
.eslintrc
.gitattributes
.htmllintrc
.nsprc
.nvmrc
.prettierignore
CHANGELOG.md Release 1.184.0 2020-08-13 12:41:06 -05:00
CODE_OF_CONDUCT.md
Gruntfile.js
LICENSE
README.md style(README files): Fix dead links in READMEs 2020-06-11 11:52:57 +05:30
package.json chore: update typescript 2020-08-15 11:15:44 -07:00
pm2.config.js chore(pm2): Add ISO timestamp to pm2 log lines 2020-06-17 17:01:16 -07:00
tsconfig.json
webpack.config.js feat(router): Add react router support to settings 2020-08-12 11:44:30 -04:00

README.md

Firefox Accounts Content Server

Coverage Status

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


Quick Start

Clone the repository, make sure you have required prerequisites installed. Run npm install and npm run start-remote. This will start a local fxa-content-server on http://localhost:3030 that works with remote Firefox Accounts servers.

If you want to install all Firefox Accounts servers locally follow the instructions on: fxa-local-dev to get a full development setup running. Please note that fxa-local-dev is the preferred way of contributing to Firefox Accounts.


Development Notes

Changes to stylesheets, scripts and templates

Any changes made to the css resources, scripts or the template files will automatically be reflected on page refresh.


Testing

Functional Tests

📖 A much more thorough breakdown of Content Server functional tests can be found in our Ecosystem Platform docs.

JDK or JRE is required to run functional tests.

This package uses Selenium to perform functional tests. By default npm test will run all functional tests under tests/. You can run specific tests with the following commands:

# Grep for "change password, sign in with new password"
npm run test -- --grep="change password, sign in with new password"

Changing the Auth Server

To change the default Auth Server edit server/config/*.json on your deployed instance.

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

Note that testing with Selenium via Docker does not work at present, so all testing must be carried out via your normal operating system's npm & Java tooling.

Using xvfb

On headless systems that can't spawn Firefox for use with Selenium, xvfb-run may be used for a virtual framebuffer for Firefox to run with. After installing xvfb-run the functional tests can be run with:

xvfb-run -s "-screen 0 1920x1200x16" npm run test-functional

Unit Tests

If you'd like to run only unit tests you can do so in your browser by navigating to http://localhost:3030/tests/index.html. You can also grep for specific tests by specifying the grep URL parameter (e.g. http://localhost:3030/tests/index.html?grep=fxa-client).


Grunt Commands

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

TASK DESCRIPTION
grunt build build production resources. See task source for more documentation
grunt clean remove any built production resources.
grunt lint run ESLint, Sass-lint, amdcheck and JSONLint on client side and testing JavaScript.
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 test run local Intern tests.
grunt version stamp a new minor version. Updates the version number and creates a new CHANGELOG.md.
grunt version:patch stamp a new patch version. Updates the version number and creates a new CHANGELOG.md.

Servers


License

MPL 2.0