完成http、https修改
This commit is contained in:
@@ -22,7 +22,13 @@ export const createServer = (config: Options): express.Express => {
|
||||
app.use(cors({origin: '*'}));
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.json());
|
||||
app.get('/config', (req, res) => res.json({ useWebSocket: config.type == 'websocket', startupMode: config.mode, logging: config.logging }));
|
||||
app.get('/config', (req, res) => res.json({
|
||||
useWebSocket: config.type == 'websocket',
|
||||
startupMode: config.mode,
|
||||
logging: config.logging,
|
||||
protocol: config.secure ? 'https' : 'http',
|
||||
port: config.port
|
||||
}));
|
||||
app.use('/signaling', signaling);
|
||||
app.use(express.static(path.join(__dirname, '../client/public')));
|
||||
app.use('/module', express.static(path.join(__dirname, '../client/src')));
|
||||
|
||||
Reference in New Issue
Block a user