From 1ae6f02d40ea5ab5827bf18724a711e676b1b06b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Tue, 7 Nov 2023 12:35:38 +0100 Subject: [PATCH] localhost --- apps/remixdesktop/package.json | 1 + apps/remixdesktop/src/main.ts | 8 ++++++++ apps/remixdesktop/src/utils/config.ts | 2 +- apps/remixdesktop/yarn.lock | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/remixdesktop/package.json b/apps/remixdesktop/package.json index f6ed5a4975..bbc2dfa711 100644 --- a/apps/remixdesktop/package.json +++ b/apps/remixdesktop/package.json @@ -44,6 +44,7 @@ "add": "^2.0.6", "byline": "^5.0.0", "chokidar": "^3.5.3", + "express": "^4.18.2", "isomorphic-git": "^1.24.2", "node-pty": "^0.10.1", "yarn": "^1.22.19" diff --git a/apps/remixdesktop/src/main.ts b/apps/remixdesktop/src/main.ts index 6a95f3206b..5d23c8562e 100644 --- a/apps/remixdesktop/src/main.ts +++ b/apps/remixdesktop/src/main.ts @@ -114,3 +114,11 @@ WindowMenu(commandKeys, execCommand, []), Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) +import express from 'express'; +import { cacheDir } from './utils/config' + +const appExpress = express() + +console.log('cacheDir', cacheDir) +appExpress.use(express.static(cacheDir)) +appExpress.listen(3000) \ No newline at end of file diff --git a/apps/remixdesktop/src/utils/config.ts b/apps/remixdesktop/src/utils/config.ts index 7ce7244dcd..6fa25244c8 100644 --- a/apps/remixdesktop/src/utils/config.ts +++ b/apps/remixdesktop/src/utils/config.ts @@ -2,7 +2,7 @@ import fs from 'fs' import os from 'os' import path from 'path' -const cacheDir = path.join(os.homedir(), '.cache_remix_ide') +export const cacheDir = path.join(os.homedir(), '.cache_remix_ide') console.log('cacheDir', cacheDir) diff --git a/apps/remixdesktop/yarn.lock b/apps/remixdesktop/yarn.lock index 6f3b41c652..6277d06b53 100644 --- a/apps/remixdesktop/yarn.lock +++ b/apps/remixdesktop/yarn.lock @@ -2210,7 +2210,7 @@ exponential-backoff@^3.1.1: resolved "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== -express@^4.14.0: +express@^4.14.0, express@^4.18.2: version "4.18.2" resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==