diff --git a/README.md b/README.md index fb5b9064d8..9fab66e67d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,23 @@ The bitwarden Web project is an AngularJS application that powers the web vault (https://vault.bitwarden.com/). +# Build/Run + +**Requirements** + +- Node.js +- Gulp + +Unless you are running the [Core](https://github.com/bitwarden/core) API locally, you'll probably need to switch the +application to target the production API. Open `package.json` and set `production` to `true`. + +Then run the following commands: + +- `gulp build` +- `gulp serve` + +You can now access the web vault at `http://localhost:4001`. + # Contribute Code contributions are welcome! Please commit any pull requests against the `master` branch. diff --git a/global.json b/global.json deleted file mode 100644 index e793049cd5..0000000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": [ "src", "test" ], - "sdk": { - "version": "1.0.0-preview2-003121" - } -} diff --git a/gulpfile.js b/gulpfile.js index c4d178e422..e3cbed41bb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -190,9 +190,9 @@ function config() { constants: _.merge({}, { appSettings: { version: project.version, - environment: project.environment + environment: project.production ? 'Production' : 'Development' } - }, require('./settings.' + project.environment + '.json') || {}) + }, require('./settings' + (project.production ? '.Production' : '') + '.json') || {}) })); } diff --git a/package.json b/package.json index 144a51c4ab..017418e97f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bitwarden", "version": "1.4.0", - "environment": "Development", + "production": false, "devDependencies": { "connect": "3.4.1", "lodash": "4.13.1", diff --git a/settings.Development.json b/settings.Development.json deleted file mode 100644 index d2bc61c999..0000000000 --- a/settings.Development.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "appSettings": { - "apiUri": "http://localhost:4000" - } -} diff --git a/settings.json b/settings.json index 430bdb234d..eed5d69b5d 100644 --- a/settings.json +++ b/settings.json @@ -1,5 +1,6 @@ { "appSettings": { - "rememberedEmailCookieName": "bit.rememberedEmail" + "rememberedEmailCookieName": "bit.rememberedEmail", + "apiUri": "http://localhost:4000" } } diff --git a/src/app/settings.js b/src/app/settings.js index e95d6b0d32..e3472e8d5d 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","version":"1.4.0","environment":"Development","apiUri":"http://localhost:4000"}); +.constant("appSettings", {"rememberedEmailCookieName":"bit.rememberedEmail","apiUri":"http://localhost:4000","version":"1.4.0","environment":"Development"});