simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 1 | import { Router } from 'express'; |
| 2 | const router = Router(); |
| 3 | import { join } from 'path'; |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 4 | |
| 5 | /* GET React App */ |
Adrien BĂ©raud | 6ecaa40 | 2021-04-06 17:37:25 -0400 | [diff] [blame] | 6 | router.get(['/app', '/app/*'], (req, res, next) => { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 7 | res.sendFile(join(__dirname, '../public', 'index.html')); |
| 8 | }); |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 9 | |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame] | 10 | export default router; |