UNPKG

738 BPlain TextView Raw
1/**
2 * Copyright (c) Microsoft Corporation. All rights reserved.
3 * Licensed under the MIT License.
4 */
5/**
6 * This is just a convenience for @conversationlearner/sdk developers to test the UI
7 */
8import uiRouter from './uiRouter'
9import * as express from 'express'
10
11const app = express()
12app.use(uiRouter)
13
14const port = 5053
15const listener = app.listen(port, () =>
16 console.log(`Navigate to http://localhost:${listener.address().port}/ui to view Conversation Learner administration application.`)
17).on('error', (error: NodeJS.ErrnoException) => {
18 if (error.code === 'EADDRINUSE') {
19 console.log(`ERROR: The UI is already running or the port (${port}) is in use by another process`)
20 return
21 }
22
23 throw error
24});
\No newline at end of file