Skip to content
Snippets Groups Projects
Commit 6e267bbd authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

production fixes

parent 67bbb204
No related branches found
No related tags found
No related merge requests found
......@@ -10,12 +10,11 @@ COPY ./public ./public
COPY package.json yarn.lock package-lock.json ./
# Installing dependencies
RUN npm install
# Building the application
RUN npm run build
RUN npm install
RUN npm install serve
RUN yarn build
# Running
EXPOSE 3000
ENTRYPOINT ["npm", "run", "start"]
ENTRYPOINT ["npm", "run", "deploy"]
{
"name": "kszkepzes-frontend",
"version": "0.2.0",
"proxy": "http://127.0.0.1:8000/",
"private": false,
"dependencies": {
"axios": "^0.19.2",
"eslint-plugin-flowtype": "^4.6.0",
"http-proxy-middleware": "^0.20.0",
"moment": "^2.24.0",
"npm": "^6.13.7",
"prop-types": "^15.7.2",
......@@ -29,7 +27,8 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"deploy": "serve -l 3000 -s build"
},
"devDependencies": {
"eslint": "6.8.0",
......
<!doctype html>
<html lang="en">
<html lang="hu">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
......
import React, { Component } from 'react';
import { Modal, Button, Form, Input, TextArea, Icon } from 'semantic-ui-react';
import { Modal, Button, Form, Input, Icon } from 'semantic-ui-react';
import { connect } from 'react-redux';
import { DateTimeInput } from 'semantic-ui-calendar-react';
import { writeEvent, eventDate, addEvent } from '../../actions/statistics'
......@@ -25,7 +25,7 @@ class AddEventForm extends Component {
}
render() {
const { name, date, description } = this.props.newEvent;
const { name, description } = this.props.newEvent;
return (
<Modal
open={this.state.showModal}
......
......@@ -37,7 +37,6 @@ class ConfirmModal extends Component {
basic
color='red'
inverted
inverted
onClick={() => this.close()}
>
<Icon name='remove' /> Nem
......
const proxy = require('http-proxy-middleware');
module.exports = function(app) {
app.use(proxy('/api', { target: 'http://127.0.0.1:8000/' }))
app.use(proxy('/media', { target: 'http://127.0.0.1:8000/' }))
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment