Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update localhost app id, readme set up, and deriv-com to deriv-app #35

Merged
merged 1 commit into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ How to work with this project
### Deploy to your gh-pages for the first time

1. Register your application [here](https://developers.binary.com/applications/). This will give you the ability to redirect back to your github pages after login.
Use `https://YOUR_GITHUB_USERNAME.github.io/deriv-com/en/logged_inws.html` for the Redirect URL and `https://YOUR_GITHUB_USERNAME.github.io/deriv-com/en/redirect.html` for the Verification URL.
Use `https://YOUR_GITHUB_USERNAME.github.io/deriv-app/` for the Redirect URL and `https://YOUR_GITHUB_USERNAME.github.io/deriv-app/en/redirect` for the Verification URL.

If you're using a custom domain, replace the github URLs above with your domain.

Expand Down Expand Up @@ -59,7 +59,9 @@ grunt dev --path=about-us
### Using sub-folders
There are times that you are working on various branches at the same time, and you want to deploy/test each branch separately on your gh-pages, you can simply use `--branch=branchname` for grunt commands:
- `grunt dev --branch=branchname`
This will deploy your changes to a sub-folder named: `br_branchname` and it can be browsed at: https://YOUR_GITHUB_USERNAME.github.io/deriv-com/br_branchname/
This will deploy your changes to a sub-folder named: `br_branchname` and it can be browsed at: https://YOUR_GITHUB_USERNAME.github.io/deriv-app/br_branchname/

**Important**: Note that you can use the same app ID created above for all your branches. There is no need to create multiple app IDs for each branch.

In order to remove the created folders from your gh-pages, you can use either:
- `grunt dev --cleanup`: removes all `br_*` folders and deploys to the root folder.
Expand All @@ -71,8 +73,14 @@ In order to remove the created folders from your gh-pages, you can use either:
- `grunt shell:remove_folder --keep --folder=br_branchname1,br_branchname2,...`: only keeps the specified folder(s) on your gh-pages and removes everything else. Just add the `--keep` flag.

### Preview on your local machine
- To preview your changes locally, run `sudo grunt serve`
- It will watch for js/css changes and rebuild on every change you make.
- Edit your `/etc/hosts` file to include this domain:
```
127.0.0.1 localhost.binary.sx
```
- To preview your changes locally for the first time, run `grunt start`:
- It will compile all templates, css, and js as well as watch for further js/css changes and rebuild on every change you make.
- To preview your changes locally without re-compiling any css/js/templates run `grunt serve`
- It will watch for js/css changes and rebuild on every change you make.
- To test changes made to templates, you need to re-compile them:
- `grunt shell:compile_dev` to re-compile all templates.
- `grunt shell:compile_dev --path=about-us` to re-compile only template(s) which serve about-us path in URL.
Expand Down
2 changes: 1 addition & 1 deletion build/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function (grunt) {
appName: {
app: 'Google\ Chrome'
},
target : 'https://localhost',
target : 'https://localhost.binary.sx',
},
middleware: (connect, options) => {
const middlewares = [
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "deriv-com",
"name": "deriv-app",
"version": "3.8.0",
"description": "DTrader content",
"scripts": {
Expand All @@ -10,17 +10,17 @@
},
"repository": {
"type": "git",
"url": "https://github.com/binary-com/deriv-com.git"
"url": "https://github.com/binary-com/deriv-app.git"
},
"keywords": [
"deriv"
],
"author": "DTrader",
"license": "Apache License 2.0",
"bugs": {
"url": "https://github.com/binary-com/deriv-com/issues"
"url": "https://github.com/binary-com/deriv-app/issues"
},
"homepage": "https://github.com/binary-com/deriv-com",
"homepage": "https://github.com/binary-com/deriv-app",
"devDependencies": {
"@babel/parser": "7.1.2",
"app-root-path": "2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const getAppId = () => {
window.localStorage.setItem('config.default_app_id', user_app_id); // it's being used in endpoint chrome extension - please do not remove
app_id = user_app_id;
} else if (/localhost/i.test(window.location.hostname)) {
app_id = 1159;
app_id = 17044;
} else {
window.localStorage.removeItem('config.default_app_id');
const current_domain = getCurrentProductionDomain();
Expand Down