# Dotenv in Angular

**URL:** <https://forum.codewithmosh.com/t/dotenv-in-angular/6188>\
**Category:** Angular\
**Created:** [July 18, 2021, 5:39am UTC](https://forum.codewithmosh.com/t/dotenv-in-angular/6188 "2021-07-18T05:39:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberttsangshsi](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@alberttsangshsi](https://forum.codewithmosh.com/u/alberttsangshsi)\
**Post date:** [July 18, 2021, 5:39am UTC](https://forum.codewithmosh.com/t/dotenv-in-angular/6188/1 "2021-07-18T05:39:21Z")

</div>

How can I use my .env(dotenv) file in Angular ?

When i type require(‘dotenv’).config() in environment.ts ,  
the terminal says : cannot find “require” .

And then i cannot use process.env in my later codes.
