Firefox Accounts DB Server
For context, see the
fxa-auth-db-mysql
repo,
which contains a MySQL backend
(for production)
and a memory-store backend
(for testing).
This package is actually a sub-directory of that repository.
Usage
// Require the dbServer. This includes dbServer.createServer() and the dbServer.errors object.var dbServer = // require the database enginevar Store = // create a DB instance and pass a logger and the dbServer.errors objectvar db = console dbServererrors // create the server and pass it the storage instancevar server = dbServer server // this will be called at the end of each failed requestserver // this will be called at the end of each successful requestserver // this will be called at the end of each failed requestserver // this will be called every 15sserver
DB API
If you would like to implement a database/storage API, this document will be useful.
Server API
If you want to know more about the endpoints implemented by this server, read the server API documentation.
License
MPL 2.0