Habib
Habib

Reputation: 948

importing "process.env" in angular2-meteor application

I am working on angular2-meteor project and I have used MailGun which can be implement or used by process.env.Mail_URL like this process.env.MAIL_URL = 'smtp://[email protected]';. It's working but I am getting error that:

cannot fine name 'process'

so how can I import it?

I have tried to import it in typing.d.ts file but it also won't work, so how will it work? How to import it? and what is it?

Upvotes: 1

Views: 973

Answers (1)

Milad
Milad

Reputation: 28590

If it's working and your problem is only Typescript complaining , you could do :

declare var process:any;

At the top of your file that uses process.

Upvotes: 4

Related Questions