Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-server-env

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-server-env

This package is used internally by Apollo Server and not meant to be consumed directly.

  • 4.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
increased by5.18%
Maintainers
1
Weekly downloads
 
Created

What is apollo-server-env?

The apollo-server-env package provides a cross-platform way to interact with the environment and system resources in a Node.js server environment, specifically tailored for Apollo Server. It abstracts away differences between environments, such as local development environments and various production environments, making it easier to write isomorphic code that runs both on the server and the client.

What are apollo-server-env's main functionalities?

Fetch API

Provides a cross-platform Fetch API implementation for making network requests. This is useful for server-side data fetching and interacting with APIs.

import { fetch } from 'apollo-server-env';

fetch('https://example.com/data').then(response => response.json()).then(data => console.log(data));

URL and URLSearchParams

Offers a way to work with URLs and URL query strings, making it easier to manipulate and query URL parameters.

import { URL, URLSearchParams } from 'apollo-server-env';

const url = new URL('https://example.com?search=apollo');
const params = new URLSearchParams(url.search);
console.log(params.get('search'));

Headers

Provides a way to create and manage HTTP headers, which is useful for configuring requests and responses in network operations.

import { Headers } from 'apollo-server-env';

const headers = new Headers();
headers.append('Content-Type', 'application/json');
console.log(headers.get('Content-Type'));

Other packages similar to apollo-server-env

FAQs

Package last updated on 18 Jan 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc