/
githubmirror
/
monaco-editor
Обзор
Документация
Войти
/
githubmirror
/
monaco-editor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/smoke/server.js
26 строк
900 B
Henning Dieterichs
Uses playwright
09 окт 2025, 00:54
09 окт 2025, 00:54
c998a7c
Код
Авторство
О чём код?
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ //@ts-check const yaserver = require('yaserver'); const http = require('http'); const path = require('path'); const REPO_ROOT = path.join(__dirname, '../../'); const PORT = parseInt(process.env.PORT || '8563', 10); yaserver .createServer({ rootDir: REPO_ROOT }) .then((/** @type {any} */ staticServer) => { const server = http.createServer((request, response) => { return staticServer.handle(request, response); }); server.listen(PORT, '127.0.0.1', () => { console.log(`Server running at http://127.0.0.1:${PORT}`); }); });