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

@remix-run/node

Package Overview
Dependencies
Maintainers
2
Versions
1035
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remix-run/node

Node.js platform abstractions for Remix

  • 0.0.0-nightly-bd6a30601-20240503
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
851K
increased by5.12%
Maintainers
2
Weekly downloads
 
Created

What is @remix-run/node?

@remix-run/node is a package that provides utilities for building server-side applications with Remix. It includes tools for handling HTTP requests and responses, managing sessions, and working with cookies, among other things.

What are @remix-run/node's main functionalities?

Handling HTTP Requests and Responses

This feature allows you to create a request handler for your Remix application. The `createRequestHandler` function sets up the necessary context for handling HTTP requests and responses.

const { createRequestHandler } = require('@remix-run/node');

const handler = createRequestHandler({
  getLoadContext() {
    return { some: 'context' };
  }
});

module.exports = handler;

Managing Sessions

This feature provides a way to manage user sessions using cookies. The `createCookieSessionStorage` function sets up session storage with specified cookie options.

const { createCookieSessionStorage } = require('@remix-run/node');

const sessionStorage = createCookieSessionStorage({
  cookie: {
    name: '__session',
    secrets: ['s3cr3t'],
    secure: true,
    sameSite: 'lax',
    path: '/',
    httpOnly: true
  }
});

module.exports = sessionStorage;

Working with Cookies

This feature allows you to create and manage cookies. The `createCookie` function sets up a cookie with specified options like max age and HTTP-only flag.

const { createCookie } = require('@remix-run/node');

const myCookie = createCookie('myCookie', {
  maxAge: 60 * 60 * 24,
  httpOnly: true
});

module.exports = myCookie;

Other packages similar to @remix-run/node

FAQs

Package last updated on 03 May 2024

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