Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-066
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
2022-066
2022-066
Commits
0f7668b7
Commit
0f7668b7
authored
May 06, 2022
by
Navodya Pasqual
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting up proxy middleware
parent
9a80c43b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2728 additions
and
98 deletions
+2728
-98
frontend/package-lock.json
frontend/package-lock.json
+2674
-91
frontend/package.json
frontend/package.json
+12
-1
frontend/src/digitalHuman/digitalHuman.js
frontend/src/digitalHuman/digitalHuman.js
+14
-0
frontend/src/index.js
frontend/src/index.js
+19
-6
frontend/src/proxySetup
frontend/src/proxySetup
+7
-0
frontend/src/routes/pageRoutes.js
frontend/src/routes/pageRoutes.js
+2
-0
No files found.
frontend/package-lock.json
View file @
0f7668b7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
frontend/package.json
View file @
0f7668b7
...
@@ -11,11 +11,19 @@
...
@@ -11,11 +11,19 @@
"react-scripts"
:
"5.0.0"
,
"react-scripts"
:
"5.0.0"
,
"web-vitals"
:
"^2.1.4"
,
"web-vitals"
:
"^2.1.4"
,
"axios"
:
"^0.21.4"
,
"axios"
:
"^0.21.4"
,
"antd"
:
"^3.26.5"
,
"prop-types"
:
"^15.7.2"
,
"bootstrap"
:
"^5.1.1"
,
"bootstrap"
:
"^5.1.1"
,
"react-bootstrap-validation"
:
"^0.1.11"
,
"react-bootstrap-validation"
:
"^0.1.11"
,
"react-router-dom"
:
"^5.3.0"
,
"react-router-dom"
:
"^5.3.0"
,
"react-redux"
:
"^7.1.3"
,
"react-select"
:
"^5.0.0"
,
"react-select"
:
"^5.0.0"
,
"react-validation"
:
"^3.0.7"
"react-speech-recognition"
:
"^3.9.0"
,
"react-validation"
:
"^3.0.7"
,
"redux"
:
"^4.0.5"
,
"redux-promise"
:
"^0.6.0"
,
"redux-thunk"
:
"^2.3.0"
,
"uuid"
:
"^3.3.2"
},
},
"scripts"
:
{
"scripts"
:
{
"start"
:
"react-scripts start"
,
"start"
:
"react-scripts start"
,
...
@@ -40,5 +48,8 @@
...
@@ -40,5 +48,8 @@
"last 1 firefox version"
,
"last 1 firefox version"
,
"last 1 safari version"
"last 1 safari version"
]
]
},
"devDependencies"
:
{
"http-proxy-middleware"
:
"^0.19.1"
}
}
}
}
frontend/src/digitalHuman/digitalHuman.js
0 → 100644
View file @
0f7668b7
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
Axios
from
'
axios
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
{
List
,
Icon
,
Avatar
}
from
'
antd
'
;
function
DigitalHuman
()
{
return
(
<
div
className
=
'
chat
'
>
Hi
<
/div
>
)
}
export
default
DigitalHuman
;
\ No newline at end of file
frontend/src/index.js
View file @
0f7668b7
...
@@ -2,13 +2,26 @@ import React from 'react';
...
@@ -2,13 +2,26 @@ import React from 'react';
import
ReactDOM
from
'
react-dom
'
;
import
ReactDOM
from
'
react-dom
'
;
import
'
./index.css
'
;
import
'
./index.css
'
;
import
App
from
'
./App
'
;
import
App
from
'
./App
'
;
import
reportWebVitals
from
'
./reportWebVitals
'
;
import
"
antd/dist/antd.css
"
;
import
{
Provider
}
from
'
react-redux
'
;
import
{
createStore
,
applyMiddleware
}
from
'
redux
'
;
import
promiseMiddleware
from
'
redux-promise
'
;
import
ReduxThunk
from
'
redux-thunk
'
;
import
{
BrowserRouter
}
from
"
react-router-dom
"
;
const
createStoreWithMiddleware
=
applyMiddleware
(
promiseMiddleware
,
ReduxThunk
)(
createStore
);
ReactDOM
.
render
(
ReactDOM
.
render
(
<
React
.
StrictMode
>
<
Provider
<
App
/>
store
=
{
createStoreWithMiddleware
(
<
/React.StrictMode>
,
window
.
__REDUX_DEVTOOLS_EXTENSION__
&&
window
.
__REDUX_DEVTOOLS_EXTENSION__
()
)}
>
<
BrowserRouter
>
<
App
/>
<
/BrowserRouter
>
<
/Provider>
,
document
.
getElementById
(
'
root
'
)
document
.
getElementById
(
'
root
'
)
);
);
reportWebVitals
();
frontend/src/proxySetup
0 → 100644
View file @
0f7668b7
const proxy = require("http-proxy-middleware");
module.exports = function(app) {
app.use(proxy("/api", { target: "http://localhost:8081/" }));
};
frontend/src/routes/pageRoutes.js
View file @
0f7668b7
...
@@ -3,6 +3,7 @@ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
...
@@ -3,6 +3,7 @@ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
//import pages
//import pages
import
Home
from
"
../main/home
"
;
import
Home
from
"
../main/home
"
;
import
DigitalHuman
from
'
../digitalHuman/digitalHuman
'
;
function
PageRoutes
()
{
function
PageRoutes
()
{
return
(
return
(
...
@@ -11,6 +12,7 @@ function PageRoutes() {
...
@@ -11,6 +12,7 @@ function PageRoutes() {
<
section
className
=
"
content
"
>
<
section
className
=
"
content
"
>
<
Switch
>
<
Switch
>
<
Route
path
=
"
/
"
component
=
{
Home
}
exact
/>
<
Route
path
=
"
/
"
component
=
{
Home
}
exact
/>
<
Route
path
=
"
/digital-human
"
component
=
{
DigitalHuman
}
/
>
<
/Switch
>
<
/Switch
>
<
/section
>
<
/section
>
<
/Router
>
<
/Router
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment