Skip to content
Open
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
2 changes: 2 additions & 0 deletions .env.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PORT=4000
REACT_APP_API_URL=http://localhost:8081/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage
node_modules
.DS_Store
build
.env
2 changes: 1 addition & 1 deletion src/components/configuration/ConfigForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ConfigForm = (conf: ConfigProps) => {
<TextField
id="github-url"
error={gitError}
label="Repository URL (GitHub /organization/repository)"
label="Repository URL (GitHub /organization/repository) or (GitHub /organization/repository#branchOrTag)"
type="text"
style={{ margin: 8 }}
placeholder="GitHub URL here"
Expand Down
5 changes: 5 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = {
apiUrl: process.env.REACT_APP_API_URL || 'http://localhost:8081/',
}

export { config };
4 changes: 2 additions & 2 deletions src/http/DoAnalyze.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ActionsRegister from "../state/ActionsRegister";
import * as React from "react";
import FetchMetadata from "./FetchMetadata";
import { config } from "../config";

const DoAnalyze = {
/**
Expand All @@ -22,8 +23,7 @@ const DoAnalyze = {
}
},
async getProphetData(path: string) {
return await fetch( 'http://127.0.0.1:8081/', {
// return await fetch( 'https://cloudhubs.ecs.baylor.edu/prophet/utils', {
return await fetch(config.apiUrl , {
method: 'POST',
body: JSON.stringify({
repositories: [
Expand Down