박민정

hoxy..

1 { 1 {
2 "files": { 2 "files": {
3 "main.css": "/static/css/main.c9112ef1.chunk.css", 3 "main.css": "/static/css/main.c9112ef1.chunk.css",
4 - "main.js": "/static/js/main.30dbcb82.chunk.js", 4 + "main.js": "/static/js/main.53397765.chunk.js",
5 - "main.js.map": "/static/js/main.30dbcb82.chunk.js.map", 5 + "main.js.map": "/static/js/main.53397765.chunk.js.map",
6 "runtime~main.js": "/static/js/runtime~main.a8a9905a.js", 6 "runtime~main.js": "/static/js/runtime~main.a8a9905a.js",
7 "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map", 7 "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map",
8 "static/css/2.b6ac9e22.chunk.css": "/static/css/2.b6ac9e22.chunk.css", 8 "static/css/2.b6ac9e22.chunk.css": "/static/css/2.b6ac9e22.chunk.css",
9 "static/js/2.4d47edc8.chunk.js": "/static/js/2.4d47edc8.chunk.js", 9 "static/js/2.4d47edc8.chunk.js": "/static/js/2.4d47edc8.chunk.js",
10 "static/js/2.4d47edc8.chunk.js.map": "/static/js/2.4d47edc8.chunk.js.map", 10 "static/js/2.4d47edc8.chunk.js.map": "/static/js/2.4d47edc8.chunk.js.map",
11 "index.html": "/index.html", 11 "index.html": "/index.html",
12 - "precache-manifest.16488c9b14dd1aef91bfa2340fd902da.js": "/precache-manifest.16488c9b14dd1aef91bfa2340fd902da.js", 12 + "precache-manifest.ed18e22bdef77bdd64652676558ebe94.js": "/precache-manifest.ed18e22bdef77bdd64652676558ebe94.js",
13 "service-worker.js": "/service-worker.js", 13 "service-worker.js": "/service-worker.js",
14 "static/css/2.b6ac9e22.chunk.css.map": "/static/css/2.b6ac9e22.chunk.css.map", 14 "static/css/2.b6ac9e22.chunk.css.map": "/static/css/2.b6ac9e22.chunk.css.map",
15 "static/css/main.c9112ef1.chunk.css.map": "/static/css/main.c9112ef1.chunk.css.map" 15 "static/css/main.c9112ef1.chunk.css.map": "/static/css/main.c9112ef1.chunk.css.map"
......
1 -<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"/><title>약 배달 서비스 : 약사</title><link href="/static/css/2.b6ac9e22.chunk.css" rel="stylesheet"><link href="/static/css/main.c9112ef1.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.4d47edc8.chunk.js"></script><script src="/static/js/main.30dbcb82.chunk.js"></script></body></html>
...\ No newline at end of file ...\ No newline at end of file
1 +<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"/><title>약 배달 서비스 : 약사</title><link href="/static/css/2.b6ac9e22.chunk.css" rel="stylesheet"><link href="/static/css/main.c9112ef1.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/2.4d47edc8.chunk.js"></script><script src="/static/js/main.53397765.chunk.js"></script></body></html>
...\ No newline at end of file ...\ No newline at end of file
......
1 self.__precacheManifest = (self.__precacheManifest || []).concat([ 1 self.__precacheManifest = (self.__precacheManifest || []).concat([
2 { 2 {
3 - "revision": "d9dcd4703f5c7de8e5597152c1420acf", 3 + "revision": "893edd1e601abaa38178d56e61a9ed06",
4 "url": "/index.html" 4 "url": "/index.html"
5 }, 5 },
6 { 6 {
...@@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ ...@@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
8 "url": "/static/css/2.b6ac9e22.chunk.css" 8 "url": "/static/css/2.b6ac9e22.chunk.css"
9 }, 9 },
10 { 10 {
11 - "revision": "176d56469d43bf1341fe", 11 + "revision": "cdbaada5321baee264a1",
12 "url": "/static/css/main.c9112ef1.chunk.css" 12 "url": "/static/css/main.c9112ef1.chunk.css"
13 }, 13 },
14 { 14 {
...@@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ ...@@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
16 "url": "/static/js/2.4d47edc8.chunk.js" 16 "url": "/static/js/2.4d47edc8.chunk.js"
17 }, 17 },
18 { 18 {
19 - "revision": "176d56469d43bf1341fe", 19 + "revision": "cdbaada5321baee264a1",
20 - "url": "/static/js/main.30dbcb82.chunk.js" 20 + "url": "/static/js/main.53397765.chunk.js"
21 }, 21 },
22 { 22 {
23 "revision": "42ac5946195a7306e2a5", 23 "revision": "42ac5946195a7306e2a5",
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 14 importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
15 15
16 importScripts( 16 importScripts(
17 - "/precache-manifest.16488c9b14dd1aef91bfa2340fd902da.js" 17 + "/precache-manifest.ed18e22bdef77bdd64652676558ebe94.js"
18 ); 18 );
19 19
20 self.addEventListener('message', (event) => { 20 self.addEventListener('message', (event) => {
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
10 ON_SUCCESS_BUY_USER 10 ON_SUCCESS_BUY_USER
11 } from './types'; 11 } from './types';
12 import { USER_SERVER } from '../components/Config.js'; 12 import { USER_SERVER } from '../components/Config.js';
13 +import { PRODUCT_SERVER } from '../components/Config.js';
13 14
14 export function registerUser(dataToSubmit) { 15 export function registerUser(dataToSubmit) {
15 const request = axios.post(`${USER_SERVER}/register`, dataToSubmit) 16 const request = axios.post(`${USER_SERVER}/register`, dataToSubmit)
...@@ -65,7 +66,7 @@ export function addToCart(_id) { ...@@ -65,7 +66,7 @@ export function addToCart(_id) {
65 66
66 67
67 export function getCartItems(cartItems, userCart) { 68 export function getCartItems(cartItems, userCart) {
68 - const request = axios.get(`/api/product/products_by_id?id=${cartItems}&type=array`) 69 + const request = axios.get(`${PRODUCT_SERVER}/products_by_id?id=${cartItems}&type=array`)
69 .then(response => { 70 .then(response => {
70 71
71 72
...@@ -93,7 +94,7 @@ export function getCartItems(cartItems, userCart) { ...@@ -93,7 +94,7 @@ export function getCartItems(cartItems, userCart) {
93 94
94 95
95 export function removeCartItem(id) { 96 export function removeCartItem(id) {
96 - const request = axios.get(`/api/users/removeFromCart?_id=${id}`) 97 + const request = axios.get(`${USER_SERVER}/removeFromCart?_id=${id}`)
97 .then(response => { 98 .then(response => {
98 99
99 response.data.cart.forEach(item => { 100 response.data.cart.forEach(item => {
......
1 //SERVER ROUTES 1 //SERVER ROUTES
2 -export const USER_SERVER = '3.209.242.35/api/users'; 2 +export const USER_SERVER = 'http://3.209.242.35/api/users';
3 +export const PRODUCT_SERVER = 'http://3.209.242.35/api/product';
......
...@@ -3,7 +3,7 @@ import Dropzone from "react-dropzone"; ...@@ -3,7 +3,7 @@ import Dropzone from "react-dropzone";
3 import { Icon } from "antd"; 3 import { Icon } from "antd";
4 import Axios from "axios"; 4 import Axios from "axios";
5 import "./FileUpload.css"; 5 import "./FileUpload.css";
6 - 6 +import { PRODUCT_SERVER } from '../Config'
7 function FileUpload(props) { 7 function FileUpload(props) {
8 const [Images, setImages] = useState([]); 8 const [Images, setImages] = useState([]);
9 9
...@@ -13,12 +13,12 @@ function FileUpload(props) { ...@@ -13,12 +13,12 @@ function FileUpload(props) {
13 header: { "content-type": "multipart/form-data" }, 13 header: { "content-type": "multipart/form-data" },
14 }; 14 };
15 formData.append("file", files[0]); 15 formData.append("file", files[0]);
16 - Axios.post("/api/product/uploadImage", formData, config).then(response => { 16 + Axios.post(`${PRODUCT_SERVER}/uploadImage`, formData, config).then(response => {
17 if (response.data.success) { 17 if (response.data.success) {
18 setImages([...Images, response.data.image]); 18 setImages([...Images, response.data.image]);
19 props.refreshFunction([...Images, response.data.image]); 19 props.refreshFunction([...Images, response.data.image]);
20 } else { 20 } else {
21 - alert("Failed to save the Image in Server"); 21 + alert("이미지 서버 업로드에 실패했습니다.");
22 } 22 }
23 }); 23 });
24 }; 24 };
......
...@@ -3,7 +3,7 @@ import Dropzone from 'react-dropzone' ...@@ -3,7 +3,7 @@ import Dropzone from 'react-dropzone'
3 import axios from 'axios'; 3 import axios from 'axios';
4 import { useState } from 'react'; 4 import { useState } from 'react';
5 import './ImageUpload.css' 5 import './ImageUpload.css'
6 - 6 +import { PRODUCT_SERVER } from '../Config'
7 function ImageUpload(props) { 7 function ImageUpload(props) {
8 8
9 const [Images, setImages] = useState([]) // 이미지를 여러장 들어가게 하기 위해서 9 const [Images, setImages] = useState([]) // 이미지를 여러장 들어가게 하기 위해서
...@@ -18,7 +18,7 @@ function ImageUpload(props) { ...@@ -18,7 +18,7 @@ function ImageUpload(props) {
18 imageData.append("file", files[0]) 18 imageData.append("file", files[0])
19 19
20 // 이미지 전달 20 // 이미지 전달
21 - axios.post('/api/product/image', imageData, config) 21 + axios.post(`${PRODUCT_SERVER}/image`, imageData, config)
22 .then(response => { 22 .then(response => {
23 if (response.data.success) { 23 if (response.data.success) {
24 //console.log(response.data) 24 //console.log(response.data)
......
...@@ -5,13 +5,15 @@ import ProductImage from './Sections/ProductImage'; ...@@ -5,13 +5,15 @@ import ProductImage from './Sections/ProductImage';
5 import ProductInfo from './Sections/ProductInfo'; 5 import ProductInfo from './Sections/ProductInfo';
6 import { addToCart } from '../../../_actions/user_actions'; 6 import { addToCart } from '../../../_actions/user_actions';
7 import { useDispatch } from 'react-redux'; 7 import { useDispatch } from 'react-redux';
8 +import { PRODUCT_SERVER } from '../../Config'
9 +
8 function DetailProductPage(props) { 10 function DetailProductPage(props) {
9 const dispatch = useDispatch(); 11 const dispatch = useDispatch();
10 const productId = props.match.params.productId 12 const productId = props.match.params.productId
11 const [Product, setProduct] = useState([]) 13 const [Product, setProduct] = useState([])
12 14
13 useEffect(() => { 15 useEffect(() => {
14 - Axios.get(`/api/product/products_by_id?id=${productId}&type=single`) 16 + Axios.get(`${PRODUCT_SERVER}/products_by_id?id=${productId}&type=single`)
15 .then(response => { 17 .then(response => {
16 setProduct(response.data[0]) 18 setProduct(response.data[0])
17 }) 19 })
......
...@@ -4,13 +4,14 @@ import {useEffect, useState} from 'react' ...@@ -4,13 +4,14 @@ import {useEffect, useState} from 'react'
4 import ProductImage from './Sections/ProductImage' 4 import ProductImage from './Sections/ProductImage'
5 import ProductInfo from './Sections/ProductInfo' 5 import ProductInfo from './Sections/ProductInfo'
6 import { Row, Col } from 'antd'; 6 import { Row, Col } from 'antd';
7 +import { PRODUCT_SERVER } from '../../Config'
7 function DetailProductPages(props) { 8 function DetailProductPages(props) {
8 const [Product, setProduct] = useState({}) 9 const [Product, setProduct] = useState({})
9 const productId = props.match.params.prouductID 10 const productId = props.match.params.prouductID
10 //console.log(props.match.params.prouductID) //->정상적으로 출력 11 //console.log(props.match.params.prouductID) //->정상적으로 출력
11 12
12 useEffect(() => { 13 useEffect(() => {
13 - axios.get(`/api/product/products_by_id?id=${productId}&type=single`) 14 + axios.get(`${PRODUCT_SERVER}/products_by_id?id=${productId}&type=single`)
14 .then(response => { 15 .then(response => {
15 if (response.data.success) { 16 if (response.data.success) {
16 console.log(response.data) 17 console.log(response.data)
......
...@@ -7,6 +7,8 @@ import { medicines, price } from "./Sections/Datas"; ...@@ -7,6 +7,8 @@ import { medicines, price } from "./Sections/Datas";
7 import SearchFeature from "./Sections/SearchFeature"; 7 import SearchFeature from "./Sections/SearchFeature";
8 import { Container } from "react-bootstrap"; 8 import { Container } from "react-bootstrap";
9 9
10 +import { PRODUCT_SERVER } from '../../Config.js'
11 +
10 const { Meta } = Card; 12 const { Meta } = Card;
11 13
12 function LandingPage() { 14 function LandingPage() {
...@@ -31,7 +33,7 @@ function LandingPage() { ...@@ -31,7 +33,7 @@ function LandingPage() {
31 }, []); 33 }, []);
32 34
33 const getProducts = variables => { 35 const getProducts = variables => {
34 - Axios.post("/api/product/getProducts", variables).then(response => { 36 + Axios.post(`${PRODUCT_SERVER}/getProducts`, variables).then(response => {
35 if (response.data.success) { 37 if (response.data.success) {
36 if (variables.loadMore) { 38 if (variables.loadMore) {
37 setProducts([...Products, ...response.data.products]); 39 setProducts([...Products, ...response.data.products]);
......
...@@ -3,7 +3,7 @@ import { useState } from 'react'; ...@@ -3,7 +3,7 @@ import { useState } from 'react';
3 import { Typography, Button, Form, Input } from 'antd'; // css 3 import { Typography, Button, Form, Input } from 'antd'; // css
4 import ImageUpload from '../../utils/ImageUpload' 4 import ImageUpload from '../../utils/ImageUpload'
5 import Axios from 'axios'; 5 import Axios from 'axios';
6 - 6 +import { PRODUCT_SERVER } from '../../Config'
7 const { TextArea } = Input; // 박스크기 조절을 사용자가 임의로 가능하게 함. 7 const { TextArea } = Input; // 박스크기 조절을 사용자가 임의로 가능하게 함.
8 8
9 // Select symtoms 9 // Select symtoms
...@@ -69,7 +69,7 @@ function UploadPage(props) { ...@@ -69,7 +69,7 @@ function UploadPage(props) {
69 symtoms: Option 69 symtoms: Option
70 } 70 }
71 71
72 - Axios.post("/api/product", body) 72 + Axios.post(`${PRODUCT_SERVER}`, body)
73 .then(response => { 73 .then(response => {
74 if (response.data.success) { 74 if (response.data.success) {
75 alert("업로드가 완료되었습니다."); 75 alert("업로드가 완료되었습니다.");
......
...@@ -2,16 +2,16 @@ import React, { useState } from "react"; ...@@ -2,16 +2,16 @@ import React, { useState } from "react";
2 import {Button, Form, message, Input, Icon } from "antd"; 2 import {Button, Form, message, Input, Icon } from "antd";
3 import FileUpload from "../../utils/FileUpload"; 3 import FileUpload from "../../utils/FileUpload";
4 import Axios from "axios"; 4 import Axios from "axios";
5 - 5 +import { PRODUCT_SERVER } from '../../Config'
6 const { TextArea } = Input; 6 const { TextArea } = Input;
7 7
8 const Medicines = [ 8 const Medicines = [
9 - { key: 1, value: "진통제" }, 9 + { key: 1, value: "진통제" },
10 - { key: 2, value: "소화제" }, 10 + { key: 2, value: "소화제" },
11 { key: 3, value: "감기약" }, 11 { key: 3, value: "감기약" },
12 { key: 4, value: "해열제" }, 12 { key: 4, value: "해열제" },
13 { key: 5, value: "파스류" }, 13 { key: 5, value: "파스류" },
14 - { key: 6, value: "상처치료" }, 14 + { key: 6, value: "상처치료" },
15 { key: 7, value: "기타" } 15 { key: 7, value: "기타" }
16 ]; 16 ];
17 17
...@@ -46,7 +46,7 @@ function UploadProductPage(props) { ...@@ -46,7 +46,7 @@ function UploadProductPage(props) {
46 event.preventDefault(); 46 event.preventDefault();
47 47
48 if (!TitleValue || !DescriptionValue || !PriceValue || !MedicinesValue || !Images) { 48 if (!TitleValue || !DescriptionValue || !PriceValue || !MedicinesValue || !Images) {
49 - return alert("fill all the fields first!"); 49 + return alert("모두 입력해주세요.");
50 } 50 }
51 51
52 const variables = { 52 const variables = {
...@@ -58,12 +58,12 @@ function UploadProductPage(props) { ...@@ -58,12 +58,12 @@ function UploadProductPage(props) {
58 medicines: MedicinesValue, 58 medicines: MedicinesValue,
59 }; 59 };
60 60
61 - Axios.post("/api/product/uploadProduct", variables).then(response => { 61 + Axios.post(`${PRODUCT_SERVER}/uploadProduct`, variables).then(response => {
62 if (response.data.success) { 62 if (response.data.success) {
63 - alert("Product Successfully Uploaded"); 63 + alert("성공적으로 업로드 되었습니다.");
64 props.history.push("/"); 64 props.history.push("/");
65 } else { 65 } else {
66 - alert("Failed to upload Product"); 66 + alert("실패했습니다.");
67 } 67 }
68 }); 68 });
69 }; 69 };
......
...@@ -2,17 +2,18 @@ import React, { Component } from 'react' ...@@ -2,17 +2,18 @@ import React, { Component } from 'react'
2 import { Typography, Button, Form, Input } from 'antd'; 2 import { Typography, Button, Form, Input } from 'antd';
3 import axios from 'axios'; 3 import axios from 'axios';
4 import FileUpload from '../../utils/FileUpload'; 4 import FileUpload from '../../utils/FileUpload';
5 +import { PRODUCT_SERVER } from '../../components/Config.js';
5 6
6 const { Title } = Typography; 7 const { Title } = Typography;
7 const { TextArea } = Input; 8 const { TextArea } = Input;
8 9
9 const Medicines = [ 10 const Medicines = [
10 - { key: 1, value: "진통제" }, 11 + { key: 1, value: "진통제" },
11 - { key: 2, value: "소화제" }, 12 + { key: 2, value: "소화제" },
12 { key: 3, value: "감기약" }, 13 { key: 3, value: "감기약" },
13 { key: 4, value: "해열제" }, 14 { key: 4, value: "해열제" },
14 { key: 5, value: "파스류" }, 15 { key: 5, value: "파스류" },
15 - { key: 6, value: "상처치료" }, 16 + { key: 6, value: "상처치료" },
16 { key: 7, value: "기타" } 17 { key: 7, value: "기타" }
17 ] 18 ]
18 19
...@@ -65,7 +66,7 @@ export class UploadProductPage extends Component { ...@@ -65,7 +66,7 @@ export class UploadProductPage extends Component {
65 price: this.state.price 66 price: this.state.price
66 } 67 }
67 68
68 - axios.post('/api/product/uploadProduct', variables) 69 + axios.post(`${PRODUCT_SERVER}/uploadProduct`, variables)
69 .then(response => { 70 .then(response => {
70 if (response.data.success) { 71 if (response.data.success) {
71 alert('성공적으로 업로드 했습니다.') 72 alert('성공적으로 업로드 했습니다.')
......
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
10 "scripts": { 10 "scripts": {
11 "start": "node server/index.js", 11 "start": "node server/index.js",
12 "build" : "cd client && npm install && npm run build", 12 "build" : "cd client && npm install && npm run build",
13 - "heroku-postbuild": "npm run build" 13 + "heroku-postbuild": "npm run build",
14 + "backend": "nodemon server/index.js",
15 + "frontend": "npm run front --prefix client",
16 + "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\""
14 }, 17 },
15 "author": "mindyeoi", 18 "author": "mindyeoi",
16 "license": "ISC", 19 "license": "ISC",
......