Socket
Socket
Sign inDemoInstall

@furystack/rest

Package Overview
Dependencies
3
Maintainers
1
Versions
135
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @furystack/rest

Generic REST package


Version published
Weekly downloads
15
decreased by-93.15%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

REST

REST API Model package for FuryStack

Generic concept

An ideal way to implement REST APIs in FuryStack is the following:

  1. Design the REST API - Create an interface that defines all endpoints, all requirements and all possible return values (~this package) You can place in a common module in a Monorepo that can be accessed both with the Backend and Frontend logic to share the API definition
  2. Implement the defined API endpoint using the interface on the backend service (~@furystack/rest-service)
  3. Import the predefined interface and use it on the client (@furystack/rest-client-fetch package)
  4. Be happy. Type safety can protect your ass if you do breaking changes with your REST API

Disclaimer

  1. Your service and client will be tightly coupled. However it can be beneficial if this is intentional but it doesn't fin in all REST API scenarios
  2. Validation doesn't come with type definitions by default - Type safety is compile-time only

Keywords

FAQs

Last updated on 15 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc