npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@equinor/opt-serve

v6.16.1

Published

Production and development server.

Downloads

71

Readme

@equinor/opt-serve

License Downloads

Release Vulnerabilities

Nodejs server for OPT applications.

Production Server

In order to run a production server this package expects that the application is build using the dependency @equinor/opt-dev.

Once the application is build a production server can be start using the cli script:

// package.json
"scripts": {
    "start": "opt-serve"
}

Advanced Configuration

You can adjust various development and production settings by setting environment variables in your shell or with .env.

Note: To create custom environment variables, you must begin with REACT_APP_. Any other variables except NODE_ENV will be ignored to avoid accidentally exposing a private key on the machine that could have the same name. Changing any environment variables will require you to restart the development server if it is running.

The list of the environment variables are:

Base server configuration:

  • HTTPS: if the webpack must use https, only use it for development, false by default.
  • HOST: the host where to execute the application. 0.0.0.0 by default.
  • PORT: the port where to execute the application. 3000 by default.
  • COOKIE_SECRET: the cookie secret used by the express server, if non is provided it will generate a random one.
  • SESSION_SECRET: the session secret used by the express server, if non is provided it will generate a random one.
  • API_URL: the api url.

Active directory configuration:

  • ADAL_ENABLED: Deprecated Enable ADAL instead of MSAL, this option should not be used and is only there to keep backward compatibility. It will be removed in future versions.
  • AD_ROUTES_ENABLED: enable the Windows Azure Active Directory Authentication server routes. false by default.
  • AD_CLIENT_ID: the Azure Active Directory Authentication client id.
  • AD_CLIENT_SECRET: the Azure Active Directory Authentication client secret.
  • AD_TENANT: the Azure Active Directory Authentication tenant (dedicated and trusted Azure Active Directory's instance).
  • AD_RESOURCE: the Azure Active Directory Authentication resource.

Browser history:

  • HISTORY_API_MIDDLEWARE: Enable the history api middleware. Use it if you are using a BrowserHistory. false by default.

Azure Application Insights key:

  • APP_INSIGHTS_INSTRUMENTATION_KEY: Azure Application Insights key, see more on appinsights. This option is useful if you are using the skeleton from create-opt-app, if you are not using it, this option is probably useless and you can safely remove it.

Webpack configuration:

  • IMAGE_INLINE_SIZE_LIMIT: The limit to get the images using the url-loader. 10000 by default. By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to 0 will disable the inlining of images.
  • GENERATE_SOURCEMAP: if the webpack should generate the source map files when compile to production. true by default. When set to false, source maps are not generated for a production build. This solves out of memory (OOM) issues on some smaller machines.
  • INLINE_RUNTIME_CHUNK: If the runtime script need to be embed into to the index.html. true by default. By default, the runtime script will be embed into the index.html during the production build. When set to false, the script will not be embedded and will be imported as usual. This is normally required when dealing with CSP.
  • DISABLE_NEW_JSX_TRANSFORM: Disables the new JSX transform introduced in React 17 and backported to React 16.14.0, 15.7.0, and 0.14.10. false by default.
  • ESLINT_NO_DEV_ERRORS: if the webpack should emit errors as warnings. false by default. When set to true, ESLint errors are converted to warnings during development. As a result, ESLint output will no longer appear in the error overlay.
  • DISABLE_ESLINT_PLUGIN: Disable the eslint webpack plugin. false by default.
  • FAST_REFRESH: Whether or not react-refresh is enabled. true by default.