Update README
This commit is contained in:
Родитель
b04cf5bd83
Коммит
4dd7504ca4
49
README.md
49
README.md
|
@ -11,38 +11,54 @@ the "what" and "why" of data breach alerts.
|
|||
|
||||
This project aims to explore how Firefox - as the user agent - can support this.
|
||||
|
||||
See [the Breach Alert Product
|
||||
Brief](https://docs.google.com/document/d/1GTS0HIihfTErA7P19HPYfvHCA3v9g67B_Cf2bpmE0Bw/edit) for more background, objectives, key use
|
||||
cases.
|
||||
See [the Breach Alert Product Brief](https://docs.google.com/document/d/1GTS0HIihfTErA7P19HPYfvHCA3v9g67B_Cf2bpmE0Bw/edit)
|
||||
for more background, objectives, key use cases.
|
||||
|
||||
## Development
|
||||
|
||||
### Requirements
|
||||
|
||||
* [node](https://nodejs.org/) 8 (with npm)
|
||||
* [Node](https://nodejs.org/) 8 (with npm)
|
||||
|
||||
### Install
|
||||
|
||||
1. clone and change to the directory:
|
||||
1. Clone and change to the directory:
|
||||
|
||||
git clone https://github.com/mozilla/blurts-server.git
|
||||
cd blurts-server
|
||||
```sh
|
||||
git clone https://github.com/mozilla/blurts-server.git
|
||||
cd blurts-server
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
npm install
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Copy the `.env-dist` file to `.env`:
|
||||
|
||||
cp .env-dist .env
|
||||
```sh
|
||||
cp .env-dist .env
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
1. Run the server:
|
||||
|
||||
node server.js
|
||||
```sh
|
||||
npm start
|
||||
```
|
||||
|
||||
2. Visit the `test.html` page at [localhost:6060/test.html](http://localhost:6060/test.html)
|
||||
|
||||
### Lint
|
||||
|
||||
After installing the dependencies, you can lint the code by calling:
|
||||
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
#### Emails
|
||||
|
||||
The included `.env-dist` sets `DEBUG_DUMMY_SMTP=1` which disables emails.
|
||||
|
@ -51,7 +67,8 @@ To send emails, you'll need to unset `DEBUG_DUMMY_SMTP` and supply real SMTP
|
|||
config values for sending email.
|
||||
|
||||
You can set and source these via the `.env` file, or set them directly:
|
||||
```
|
||||
|
||||
```sh
|
||||
export DEBUG_DUMMY_SMTP=
|
||||
export SMTP_HOST=<your-smtp-host>
|
||||
export SMTP_PORT=<your-smtp-port>
|
||||
|
@ -65,7 +82,8 @@ To use Firefox Accounts, you'll need to [create an FxA Oauth Client](https://oau
|
|||
and then set some `OAUTH` config values.
|
||||
|
||||
You can set and source these via the `.env` file, or set them directly:
|
||||
```
|
||||
|
||||
```sh
|
||||
OAUTH_CLIENT_ID=<your-fxa-oauth-client-id>
|
||||
OAUTH_CLIENT_SECRET=<your-fxa-oauth-client-secret>
|
||||
OAUTH_AUTHORIZATION_URI="https://oauth-stable.dev.lcip.org/v1/authorization"
|
||||
|
@ -74,17 +92,18 @@ OAUTH_TOKEN_URI="https://oauth-stable.dev.lcip.org/v1/token"
|
|||
```
|
||||
|
||||
## Testing
|
||||
|
||||
TBD
|
||||
|
||||
## Deployment
|
||||
|
||||
blurts is designed with [12-factor](https://12factor.net/) methodology.
|
||||
|
||||
### Deploy on heroku
|
||||
### Deploy on Heroku
|
||||
|
||||
You will need to set required environment variables on heroku.
|
||||
You will need to set required environment variables on Heroku.
|
||||
|
||||
```
|
||||
```sh
|
||||
heroku config:set COOKIE_SECRET=unsafe-cookie-secret-for-heroku
|
||||
heroku config:set DEBUG_DUMMY_SMTP=1
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче