Skip to content

Commit

Permalink
docs: Update README.md and env.examples
Browse files Browse the repository at this point in the history
  • Loading branch information
a-kuharenko committed Sep 8, 2019
1 parent a84a31b commit d0c16f1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ REACT_APP_SERVER_URL = "http://localhost:3000" # default. has to be changed if
REACT_APP_RAW_SERVER_URL = http://localhost:3003 # default. has to be changed if it is different
REACT_APP_STACK_OVERFLOW_API_KEY = "K)aMbXa)izv27xUSCXUW8A(("
REACT_APP_STACK_OVERFLOW_API_URL = "https://api.stackexchange.com/2.2/search"
REACT_APP_ELASTIC_HOST = https://search-xxxx-elastic-xxxxxxxxfqsenxxxsm.eu-central-1.es.amazonaws.com # need to be changed
REACT_APP_ELASTIC_PORT = 443 # default. has to be changed if it is different
REACT_APP_ELASTIC_INDEX = search-test # default. has to be changed if it is different
```

_/server/.env_
Expand Down Expand Up @@ -167,6 +170,10 @@ SECRET_KEY = secretkey # has to be changed to own random secret key
GIT_PATH = '' # Has to be changed to path where you want to save repositories
SSH_KEYS = .ssh/authorized_keys # default path to 'authorized_keys' file to store SSH keys in
ELASTIC_HOST = https://search-xxxx-elastic-xxxxxxxxfqsenxxxsm.eu-central-1.es.amazonaws.com # need to be changed
ELASTIC_PORT = 443 # default. has to be changed if it is different
ELASTIC_INDEX = search-test # default. has to be changed if it is different
```

_/raw-server/.env_
Expand Down
10 changes: 10 additions & 0 deletions client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ REACT_APP_RAW_SERVER_URL = http://localhost:3003
#
REACT_APP_STACK_OVERFLOW_API_KEY = "K)aMbXa)izv27xUSCXUW8A(("
REACT_APP_STACK_OVERFLOW_API_URL = "https://api.stackexchange.com/2.2/search"

#
# Elasticsearch
#
#REACT_APP_ELASTIC_HOST - need to be changed
#REACT_APP_ELASTIC_PORT - default. has to be changed if it is different
#REACT_APP_ELASTIC_INDEX - default. has to be changed if it is different
REACT_APP_ELASTIC_HOST = https://search-xxxx-elastic-xxxxxxxxfqsenxxxsm.eu-central-1.es.amazonaws.com
REACT_APP_ELASTIC_PORT = 443
REACT_APP_ELASTIC_INDEX = search-test
2 changes: 1 addition & 1 deletion client/src/helpers/elasticsearchHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client({
host: elasticHost,
port: elasticPort
});
console.log(index);

export const addUser = async ( username ) =>
client.index({
index,
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/CodeTab/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CodeTab extends React.Component {
}

const defaultPath = `/${ownername}/${reponame}/tree/${branch}`;
console.log(defaultPath);

history.push(defaultPath);

fetchBranch({ repoID, branch });
Expand Down
10 changes: 10 additions & 0 deletions server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,13 @@ REPO_DATA_QUEUE_NAME = repo-data
# Path to 'authorized_keys' file
#
SSH_KEYS = .ssh/authorized_keys

#
# Elasticsearch
#
#ELASTIC_HOST - need to be changed
#ELASTIC_PORT - default. has to be changed if it is different
#ELASTIC_INDEX - default. has to be changed if it is different
ELASTIC_HOST = https://search-xxxx-elastic-xxxxxxxxfqsenxxxsm.eu-central-1.es.amazonaws.com
ELASTIC_PORT = 443
ELASTIC_INDEX = search-test

0 comments on commit d0c16f1

Please sign in to comment.