Commit 560713e9 authored by Markus Grigull's avatar Markus Grigull

Add backend environment support

Add proxy for development
parent 5d70a737
......@@ -16,9 +16,10 @@ services:
image: villasweb-backend
links:
- database
environment:
- NODE_ENV=production
database:
image: mongo:latest
volumes:
- /opt/database:/data/db
# volumes:
# - /opt/database:/data/db
......@@ -7,10 +7,10 @@ server {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# rewrite url to exclude /api on context broker side
rewrite ^/api/?(.*) /api/v1/$1 break;
rewrite ^/api/?(.*) /api/$1 break;
proxy_pass http://backend:4000/;
}
......
......@@ -2,6 +2,7 @@
"name": "villasweb-frontend",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:4000",
"dependencies": {
"bootstrap": "^3.3.7",
"classnames": "^2.2.5",
......
......@@ -22,7 +22,7 @@
import RestAPI from '../api/rest-api';
import AppDispatcher from '../app-dispatcher';
const API_URL = 'http://localhost:4000/api/v1';
const API_URL = '/api/v1';
class RestDataManager {
constructor(type, url, keyFilter) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment