Skip to content

Commit

Permalink
add setup file
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrymailk committed Nov 5, 2021
1 parent 4e81f9c commit bbdbd10
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
release: python setup.py
web: python ./server/main/english_learn/manage.py runserver 0.0.0.0:\$PORT
14 changes: 14 additions & 0 deletions frontend/frontend_learn_english/src/config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { prodConfig } from "./prod.env";
import { devConfig } from "./dev.env";

const isProduction = true;

let config;

if (isProduction) {
config = prodConfig;
} else {
config = devConfig;
}

export { config };
5 changes: 5 additions & 0 deletions frontend/frontend_learn_english/src/config/dev.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const devConfig = {
url: "http://127.0.0.1:8000/",
};

export { devConfig };
5 changes: 5 additions & 0 deletions frontend/frontend_learn_english/src/config/prod.env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const prodConfig = {
url: "https://english-card-test.herokuapp.com/",
};

export { prodConfig };
4 changes: 2 additions & 2 deletions frontend/frontend_learn_english/src/utils/api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from "axios";
import store from "../store";
// import router from "../router";

import { config } from "../config/config";
var apiServer = axios.create({
baseURL: "http://127.0.0.1:8000/",
baseURL: config.url,

crossdomain: true,
});
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import nltk

nltk.download('punkt')

0 comments on commit bbdbd10

Please sign in to comment.