start from subfolder
parent
357235a366
commit
e01c3f5a23
6
Notes
6
Notes
|
@ -4,3 +4,9 @@ console.log(process.env.REACT_APP_TEST_KEY);
|
||||||
PUBLIC_URL=http://127.0.0.1/play-nine
|
PUBLIC_URL=http://127.0.0.1/play-nine
|
||||||
|
|
||||||
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
|
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
https://medium.com/@svinkle/how-to-deploy-a-react-app-to-a-subdirectory-f694d46427c1
|
||||||
|
https://stackoverflow.com/questions/49429906/how-should-i-configure-create-react-app-to-serve-app-from-subdirectory
|
||||||
|
https://skryvets.com/blog/2018/09/20/an-elegant-solution-of-deploying-react-app-into-a-subdirectory/
|
|
@ -1,12 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Game from "./game";
|
import Game from "./game";
|
||||||
|
import PageNotFound from "./PageNotFound";
|
||||||
|
import { Route, Switch } from "react-router-dom";
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
state = {};
|
state = {};
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Game />
|
<Switch>
|
||||||
|
<Route exact path="/" component={Game} />
|
||||||
|
<Route component={PageNotFound} />
|
||||||
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const PageNotFound = () => <h1>Oops! Page not found</h1>;
|
||||||
|
|
||||||
|
export default PageNotFound;
|
Loading…
Reference in New Issue