New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@entando/env

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entando/env

entando env

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Entando ENV

this package is designed to create and override env variables in a React project.

import env from '@entando/env';

env('path/To/Overrides.json').then(() => {
  ReactDOM.render(<App />, document.getElementById('root'));
});

the package returns a function that expect as an argument the path of the json containing the overrides:

{
  "name": "whatever"
}

This path cannot be relative:

'./file.json' // bad
'../../file.json' // bad
'file.json' // good
'directory/file.json' // good

the package will then create inside a process a new object named entando which will be the resulting merge of process.env with the JSON containing the overrides.

after creating process.entando it will return a promise which should be used in the index.js to render the React app as in the example above.

every part of the application will then be able to consume the new object at will.

Keywords

entando

FAQs

Package last updated on 09 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts