Search code examples
angularmeteorprocessangular2-meteor

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?


Solution

  • 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.