express wildcard
This commit is contained in:
parent
fb64977d06
commit
c5d7d4b275
@ -6,6 +6,7 @@ export default () => {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Route exact path="/" component={Home} />
|
<Route exact path="/" component={Home} />
|
||||||
|
<Route exact path="/hi" component={() => 'Hi'} />
|
||||||
</div>
|
</div>
|
||||||
) ;
|
) ;
|
||||||
};
|
};
|
@ -4,7 +4,7 @@ import renderer from './helpers/renderer';
|
|||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.use(express.static('public'));
|
app.use(express.static('public'));
|
||||||
app.get('/', (req, res) => {
|
app.get('*', (req, res) => {
|
||||||
res.send(renderer(req));
|
res.send(renderer(req));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user