1 | /**
|
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
|
3 | * Licensed under the MIT License.
|
4 | */
|
5 | import * as express from 'express'
|
6 | import * as clUI from '@conversationlearner/ui'
|
7 |
|
8 | // console.log(`@conversationlearner/ui directory path: `, clUI.directoryPath)
|
9 | // console.log(`@conversationlearner/ui default file path: `, clUI.defaultFilePath)
|
10 |
|
11 | const router = express.Router({ caseSensitive: false })
|
12 | router.use('/ui', express.static(clUI.directoryPath));
|
13 | router.get('/ui/*', (_, res) => {
|
14 | res.sendFile(clUI.defaultFilePath)
|
15 | })
|
16 |
|
17 | export default router
|