Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add nestjs in electron #281

Open
mkashifbaloch opened this issue Aug 28, 2021 · 1 comment
Open

How to add nestjs in electron #281

mkashifbaloch opened this issue Aug 28, 2021 · 1 comment

Comments

@mkashifbaloch
Copy link

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
Copy link
Author

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);
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant