Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as MRE from '@microsoft/mixed-reality-extension-sdk';
import dotenv from 'dotenv';
import { resolve as resolvePath } from 'path';
import { App } from './app';
// Read .env if file exists
dotenv.config();
process.on('uncaughtException', (err) => console.log('uncaughtException', err));
process.on('unhandledRejection', (reason) => console.log('unhandledRejection', reason));
// MRE.log.enable('network');
// MRE.log.enable('network-content');
// Start listening for connections, and serve static files
const server = new MRE.WebHost({
// baseUrl: 'http://.ngrok.io',
baseDir: resolvePath(__dirname, '../public'),
});
// Handle new application sessions
server.adapter.onConnection((context, params) => new App(context, params, server.baseUrl));
export default server;
* Licensed under the MIT License.
*/
import { WebHost } from '@microsoft/mixed-reality-extension-sdk';
import dotenv from 'dotenv';
import { resolve as resolvePath } from 'path';
import App from './app';
process.on('uncaughtException', err => console.log('uncaughtException', err));
process.on('unhandledRejection', reason => console.log('unhandledRejection', reason));
// Read .env if file exists
dotenv.config();
// Start listening for connections, and serve static files
const server = new WebHost({
// baseUrl: 'http://.ngrok.io',
baseDir: resolvePath(__dirname, '../public')
});
// Handle new application sessions
server.adapter.onConnection(context => new App(context, server.baseUrl));
import { log, WebHost } from '@microsoft/mixed-reality-extension-sdk';
import dotenv from 'dotenv';
import { resolve as resolvePath } from 'path';
import App from './app';
// Read .env if file exists
dotenv.config();
process.on('uncaughtException', err => console.log('uncaughtException', err));
process.on('unhandledRejection', reason => console.log('unhandledRejection', reason));
log.enable('app');
// Start listening for connections, and serve static files
const server = new WebHost({
// baseUrl: 'http://.ngrok.io',
baseDir: resolvePath(__dirname, '../public')
});
// Handle new application sessions
server.adapter.onConnection(context => new App(context, server.baseUrl));
import { log, WebHost } from '@microsoft/mixed-reality-extension-sdk';
import dotenv from 'dotenv';
import { resolve as resolvePath } from 'path';
import App from './app';
// Read .env if file exists
dotenv.config();
process.on('uncaughtException', err => console.log('uncaughtException', err));
process.on('unhandledRejection', reason => console.log('unhandledRejection', reason));
log.enable('app');
// Start listening for connections, and serve static files
const server = new WebHost({
// baseUrl: 'http://.ngrok.io',
baseDir: resolvePath(__dirname, '../public')
});
// Handle new application sessions
server.adapter.onConnection(context => new App(context, server.baseUrl));
import { log, WebHost } from '@microsoft/mixed-reality-extension-sdk';
import dotenv from 'dotenv';
import { resolve as resolvePath } from 'path';
import App from './app';
// Read .env if file exists
dotenv.config();
process.on('uncaughtException', err => console.log('uncaughtException', err));
process.on('unhandledRejection', reason => console.log('unhandledRejection', reason));
log.enable('app');
// Start listening for connections, and serve static files
const server = new WebHost({
// baseUrl: 'http://.ngrok.io',
baseDir: resolvePath(__dirname, '../public')
});
// Handle new application sessions
server.adapter.onConnection(context => new App(context, server.baseUrl));
/* Sample .env file:
* PORT=80
* BASE_URL=http://.ngrok.io
* MRE_LOGGING=app:error,network,network-content
*/
import { WebHost } from '@microsoft/mixed-reality-extension-sdk';
import { resolve as resolvePath } from 'path';
import App from './app';
process.on('uncaughtException', err => console.log('uncaughtException', err));
process.on('unhandledRejection', reason => console.log('unhandledRejection', reason));
// Start listening for connections, and serve static files
const server = new WebHost({
baseDir: resolvePath(__dirname, '../public')
});
// Handle new application sessions
server.adapter.onConnection(context => new App(context, server.baseUrl));