startElectron.ts 373 B

1234567891011121314
  1. import { createServer } from 'vite';
  2. import path from 'path';
  3. import { startCompilerElectron } from './compilerElectron';
  4. (async () => {
  5. const server = await createServer({
  6. root: path.resolve(__dirname, '../../'),
  7. });
  8. const app = await server.listen();
  9. const port = app.config.server.port;
  10. startCompilerElectron(port);
  11. process.env.PORT = `${port}`;
  12. })();