express wildcard

This commit is contained in:
agatha 2024-04-12 20:44:25 -04:00
parent fb64977d06
commit c5d7d4b275
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ export default () => {
return (
<div>
<Route exact path="/" component={Home} />
<Route exact path="/hi" component={() => 'Hi'} />
</div>
) ;
};

View File

@ -4,7 +4,7 @@ import renderer from './helpers/renderer';
const app = express();
app.use(express.static('public'));
app.get('/', (req, res) => {
app.get('*', (req, res) => {
res.send(renderer(req));
});