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

@ape-framework/common

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ape-framework/common

Node.js API framework.

  • 0.0.0-dev.1
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Ape Framework

Node.js API framework.

NPM packages:

GitHub repository: ApeCommerce/ape-framework

Installation

Server package:

yarn add @ape-framework/server

Common package:

yarn add @ape-framework/common

The common package is a subset of the server package with no dependency. It contains useful interfaces and modules for a client application or shared library to interact with the server.

Hello Ape!

Create a hello bundle:

// bundle/hello.ts
import { Bundle } from '@ape-framework/server/boot/bundle';
import sendResponse from '@ape-framework/server/api/handler';

const bundle: Bundle = {
  bundleId: 'hello',
  name: 'The hello bundle',
  routes: [
    {
      endpoint: {
        method: 'GET',
        path: '/hello',
      },
      handler: () => sendResponse('Hello Ape!'),
    },
  ],
};

export default bundle;

Define the boot module:

// boot.ts
import { Boot } from '@ape-framework/server/boot';

const boot: Boot = {
  bundleModules: ['bundle/hello'],
};

export default boot;

Start the API:

yarn ape-cli api start

FAQs

Package last updated on 14 Jun 2023

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