xplat icon indicating copy to clipboard operation
xplat copied to clipboard

How to add nestjs in electron

Open mkashifbaloch opened this issue 4 years ago • 1 comments

Hi Guys,

Can someone please guide me that how i can properly add nestjs application in electron.

I want create a desktop electron application which will be using angular for frontend and one local nestjs server inside electron and one external nestjs server which will not be in electron.

mkashifbaloch avatar Aug 28 '21 13:08 mkashifbaloch

currently i have added bootstrap in in electron index.ts file and then called that method from createWindow method... is that a correct way?

async function bootstrap() { const app = await NestFactory.create(AppModule); const globalPrefix = 'api'; app.setGlobalPrefix(globalPrefix); const port = process.env.PORT || 4444; await app.listen(port, () => { //Logger.log('Listening at http://localhost:' + port + '/' + globalPrefix); }); }

mkashifbaloch avatar Aug 28 '21 16:08 mkashifbaloch